Browse Source

alternating slot bg

master
Josh 1 year ago
parent
commit
b6ddfada53
  1. 2
      namedropper/Assets/Scenes/GoldMiner.unity
  2. 200
      namedropper/Assets/Scenes/LevelSelectScene.unity
  3. 36
      namedropper/Assets/Spinner.cs

2
namedropper/Assets/Scenes/GoldMiner.unity

@ -3273,7 +3273,7 @@ MonoBehaviour:
m_HorizontalOverflow: 1 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 0
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: D&D Monsters m_Text:
--- !u!222 &1415156233 --- !u!222 &1415156233
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

200
namedropper/Assets/Scenes/LevelSelectScene.unity

@ -748,8 +748,8 @@ MonoBehaviour:
m_fontMaterials: [] m_fontMaterials: []
m_fontColor32: m_fontColor32:
serializedVersion: 2 serializedVersion: 2
rgba: 2751463423 rgba: 3120562176
m_fontColor: {r: 1, g: 1, b: 1, a: 0.6392157} m_fontColor: {r: 0, g: 0, b: 0, a: 0.7294118}
m_enableVertexGradient: 0 m_enableVertexGradient: 0
m_colorMode: 3 m_colorMode: 3
m_fontColorGradient: m_fontColorGradient:
@ -866,13 +866,97 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -2.46, y: -1.33} m_AnchoredPosition: {x: -2.46, y: -1.33}
m_SizeDelta: {x: 1920, y: 5} m_SizeDelta: {x: 1920, y: 5}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &622483133
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 622483135}
- component: {fileID: 622483134}
m_Layer: 0
m_Name: slotBackgroundBottom
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &622483134
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 622483133}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &622483135
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 622483133}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.51, y: -1.87, z: 37.9}
m_LocalScale: {x: 7.5200434, y: 2.5102441, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &688218922 --- !u!1001 &688218922
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1255,7 +1339,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 7 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -1451,7 +1535,7 @@ GameObject:
- component: {fileID: 894434945} - component: {fileID: 894434945}
- component: {fileID: 894434944} - component: {fileID: 894434944}
m_Layer: 0 m_Layer: 0
m_Name: blackground m_Name: slotBackground
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -1517,12 +1601,12 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 894434943} m_GameObject: {fileID: 894434943}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.51, y: -0.32, z: 40.47} m_LocalPosition: {x: -2.5100098, y: -0.32000732, z: 40.47}
m_LocalScale: {x: 7.5200434, y: 2.5102441, z: 1} m_LocalScale: {x: 7.5200434, y: 2.5102441, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &985132082 --- !u!1 &985132082
GameObject: GameObject:
@ -1571,8 +1655,8 @@ MonoBehaviour:
m_fontMaterials: [] m_fontMaterials: []
m_fontColor32: m_fontColor32:
serializedVersion: 2 serializedVersion: 2
rgba: 2751463423 rgba: 3120562176
m_fontColor: {r: 1, g: 1, b: 1, a: 0.6392157} m_fontColor: {r: 0, g: 0, b: 0, a: 0.7294118}
m_enableVertexGradient: 0 m_enableVertexGradient: 0
m_colorMode: 3 m_colorMode: 3
m_fontColorGradient: m_fontColorGradient:
@ -1689,7 +1773,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 8 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -1730,6 +1814,10 @@ MonoBehaviour:
_mainText: {fileID: 693543459} _mainText: {fileID: 693543459}
_bottomText: {fileID: 985132083} _bottomText: {fileID: 985132083}
_instructions: {fileID: 2030516559} _instructions: {fileID: 2030516559}
_slotBackgrounds:
- {fileID: 1088460467}
- {fileID: 894434944}
- {fileID: 622483134}
_tingSound: {fileID: 8300000, guid: a4094b6328f12884d8f174a320bff865, type: 3} _tingSound: {fileID: 8300000, guid: a4094b6328f12884d8f174a320bff865, type: 3}
_audSource: [] _audSource: []
--- !u!4 &1037632149 --- !u!4 &1037632149
@ -1745,7 +1833,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 10 m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1037632150 --- !u!114 &1037632150
MonoBehaviour: MonoBehaviour:
@ -1764,6 +1852,90 @@ MonoBehaviour:
- {fileID: 591775156} - {fileID: 591775156}
- {fileID: 688218924} - {fileID: 688218924}
- {fileID: 2068306297} - {fileID: 2068306297}
--- !u!1 &1088460466
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1088460468}
- component: {fileID: 1088460467}
m_Layer: 0
m_Name: slotBackgroundTop
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &1088460467
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1088460466}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1088460468
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1088460466}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.51, y: 1.61, z: 37.74}
m_LocalScale: {x: 7.5200434, y: 2.5102441, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1132382650 --- !u!1 &1132382650
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1797,7 +1969,7 @@ Transform:
- {fileID: 1526105807} - {fileID: 1526105807}
- {fileID: 1177381788} - {fileID: 1177381788}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1167115249 --- !u!1 &1167115249
GameObject: GameObject:
@ -1832,7 +2004,7 @@ RectTransform:
- {fileID: 688218923} - {fileID: 688218923}
- {fileID: 2068306296} - {fileID: 2068306296}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 11 m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -2540,7 +2712,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 9 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

36
namedropper/Assets/Spinner.cs

@ -15,6 +15,7 @@ public class Spinner : MonoBehaviour
[SerializeField] TextMeshPro _bottomText; [SerializeField] TextMeshPro _bottomText;
[SerializeField] TextMeshPro _instructions; [SerializeField] TextMeshPro _instructions;
List<string> _gameList = new List<string>(); List<string> _gameList = new List<string>();
[SerializeField] SpriteRenderer[] _slotBackgrounds = new SpriteRenderer[3];
bool _spinning = false; bool _spinning = false;
int _targetGameIndex = 0; int _targetGameIndex = 0;
@ -126,25 +127,54 @@ public class Spinner : MonoBehaviour
do do
{ {
currentGameIndex++; currentGameIndex++;
if (currentGameIndex > _gameList.Count) if (currentGameIndex >= _gameList.Count)
currentGameIndex = 0; currentGameIndex = 0;
_topText.text = GetGameName(currentGameIndex - 1); _topText.text = GetGameName(currentGameIndex - 1);
_mainText.text = GetGameName(currentGameIndex); _mainText.text = GetGameName(currentGameIndex);
_bottomText.text = GetGameName(currentGameIndex + 1); _bottomText.text = GetGameName(currentGameIndex + 1);
FlipColors();
PlayHitClip(); PlayHitClip();
delay *= 1.1f; delay *= 1.1f;
//Debug.Log("delay: " + delay); //Debug.Log("delay: " + delay);
yield return new WaitForSeconds(delay); yield return new WaitForSeconds(delay);
} }
while (delay < .5f); while (delay < .5f);
PlayHitClip();
_mainText.color = Color.cyan; _mainText.color = Color.cyan;
yield return new WaitForSeconds(1.0f); yield return new WaitForSeconds(2.0f);
LoadScene(_mainText.text); LoadScene(_mainText.text);
} }
void FlipColors()
{
foreach (SpriteRenderer spriteRenderer in _slotBackgrounds)
{
FlipColor(spriteRenderer);
}
FlipColor(_topText);
FlipColor(_mainText);
FlipColor(_bottomText);
}
void FlipColor(SpriteRenderer spriteRenderer)
{
if (spriteRenderer.color.r == 0)
spriteRenderer.color = Color.white;
else
spriteRenderer.color = Color.black;
}
void FlipColor(TextMeshPro textMeshPro)
{
if (textMeshPro.color.r == 0)
textMeshPro.color = Color.white;
else
textMeshPro.color = Color.black;
}
public void PlayHitClip() public void PlayHitClip()
{ {
for (int i = 0; i < _audSource.Length; i++) for (int i = 0; i < _audSource.Length; i++)

Loading…
Cancel
Save