Browse Source

build for wonderville test

combinedRaceAndNameDropper
Josh 2 years ago
parent
commit
44bb01cd7d
  1. 2
      namedropper/Assets/Resources/categories.yaml
  2. 12
      namedropper/Assets/Scenes/Game.unity
  3. 12
      namedropper/Assets/Scenes/PlayerSelectJoin.unity
  4. 251
      namedropper/Assets/Scenes/Title.unity
  5. 93
      namedropper/Assets/Scenes/TopicSelect.unity
  6. 37
      namedropper/Assets/Scripts/Game.cs
  7. 21
      namedropper/Assets/Scripts/GameManager.cs
  8. 4
      namedropper/Assets/Scripts/GameOverScreen.cs
  9. 8
      namedropper/Assets/Scripts/Join.cs
  10. 77
      namedropper/Assets/Scripts/JoinPlayer.cs
  11. 19
      namedropper/Assets/Scripts/Level.cs
  12. 44
      namedropper/Assets/Scripts/Player.cs
  13. 119
      namedropper/Assets/Scripts/TopicSelect.cs
  14. 3
      namedropper/Assets/Scripts/TrackballInputManager.cs
  15. 246
      namedropper/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset

2
namedropper/Assets/Resources/categories.yaml

@ -729,7 +729,7 @@ Topics:
- Kasai
- Ubangi
- Limpopo
- Category: South American
- Category: South America
Elements:
- Amazon
- Paraná

12
namedropper/Assets/Scenes/Game.unity

@ -411,7 +411,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: eac04632d0bd30d478787e8eb05be51a, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Blue
value: Player Dark Blue 0
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -1286,7 +1286,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 2f01e2942ef4ad14588a697df7646921, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Red
value: Player Light Red 2
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -3600,10 +3600,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_players:
- {fileID: 1791992020}
- {fileID: 23812149}
- {fileID: 707823885}
- {fileID: 1791992020}
- {fileID: 1777639902}
- {fileID: 707823885}
Score1: {fileID: 1957998283}
Score2: {fileID: 1042264265}
Score3: {fileID: 119717092}
@ -4669,7 +4669,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 9b9cc57300015d24187df4c97811c8dc, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Red
value: Player Dark Red 3
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -5098,7 +5098,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Blue
value: Player Light Blue 1
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer

12
namedropper/Assets/Scenes/PlayerSelectJoin.unity

@ -252,7 +252,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Blue
value: Player Light Blue 1
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -571,7 +571,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 2f01e2942ef4ad14588a697df7646921, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Red
value: Player Light Red 2
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -776,7 +776,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 9b9cc57300015d24187df4c97811c8dc, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Red
value: Player Dark Red 3
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -1118,7 +1118,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: eac04632d0bd30d478787e8eb05be51a, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Blue
value: Player Dark Blue 0
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -1404,10 +1404,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_players:
- {fileID: 261236788}
- {fileID: 1272407096}
- {fileID: 1192266245}
- {fileID: 261236788}
- {fileID: 1003872903}
- {fileID: 1192266245}
--- !u!1 &1666960087
GameObject:
m_ObjectHideFlags: 0

251
namedropper/Assets/Scenes/Title.unity

@ -402,7 +402,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -483.4, y: 138.1}
m_AnchoredPosition: {x: -483.4, y: 15.5}
m_SizeDelta: {x: 794.5, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &405287454
@ -434,8 +434,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278197247
m_fontColor: {r: 1, g: 0.10522418, b: 0, a: 1}
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@ -547,7 +547,7 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &755979897
--- !u!1 &742397142
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -555,45 +555,45 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 755979898}
- component: {fileID: 755979900}
- component: {fileID: 755979899}
- component: {fileID: 742397143}
- component: {fileID: 742397145}
- component: {fileID: 742397144}
m_Layer: 5
m_Name: logo
m_Name: Text (TMP) (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &755979898
--- !u!224 &742397143
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 755979897}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_GameObject: {fileID: 742397142}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 6.540667, y: 3.2703335, z: 3.2703335}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 968052336}
m_RootOrder: 0
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -550.3, y: 330}
m_SizeDelta: {x: 100, y: 100}
m_AnchoredPosition: {x: 393.2, y: 62.1}
m_SizeDelta: {x: 794.5, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &755979899
--- !u!114 &742397144
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 755979897}
m_GameObject: {fileID: 742397142}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
@ -604,20 +604,82 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 2800000, guid: ddbe8a20eb1310d41be22d691d8fa84b, type: 3}
m_UVRect:
m_text: '[prototype]'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_sharedMaterial: {fileID: 1001970574707011636, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!222 &755979900
rgba: 4278238463
m_fontColor: {r: 1, g: 0.7372549, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 63.54
m_fontSizeBase: 63.54
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &742397145
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 755979897}
m_GameObject: {fileID: 742397142}
m_CullTransparentMesh: 1
--- !u!1 &884138489
GameObject:
@ -756,10 +818,11 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 755979898}
- {fileID: 1120596757}
- {fileID: 405287453}
- {fileID: 1146838461}
- {fileID: 330190469}
- {fileID: 742397143}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -776,6 +839,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 968052332}
m_CullTransparentMesh: 1
--- !u!1 &1120596756
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1120596757}
- component: {fileID: 1120596759}
- component: {fileID: 1120596758}
m_Layer: 5
m_Name: TITLE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1120596757
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1120596756}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 968052336}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -128.2, y: 519.1}
m_SizeDelta: {x: 1583.6, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1120596758
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1120596756}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: ICON
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_sharedMaterial: {fileID: 1001970574707011636, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278238463
m_fontColor: {r: 1, g: 0.7356628, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 479.7
m_fontSizeBase: 479.7
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1120596759
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1120596756}
m_CullTransparentMesh: 1
--- !u!1 &1146838460
GameObject:
m_ObjectHideFlags: 0

93
namedropper/Assets/Scenes/TopicSelect.unity

@ -168,6 +168,7 @@ RectTransform:
m_Children:
- {fileID: 1225785572}
- {fileID: 277092717}
- {fileID: 760273394}
m_Father: {fileID: 1666960088}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -257,7 +258,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Blue
value: Player Light Blue 1
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -449,6 +450,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 277092716}
m_CullTransparentMesh: 1
--- !u!1 &760273393
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 760273394}
- component: {fileID: 760273396}
- component: {fileID: 760273395}
m_Layer: 5
m_Name: Subtitle2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &760273394
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 760273393}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 107001399}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -28.23}
m_SizeDelta: {x: 167.5, y: 231.1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &760273395
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 760273393}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.4462726, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: aceb68b22a47f0f4dbf70163ea752dad, type: 3}
m_FontSize: 56
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 300
m_Alignment: 1
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Subtitle 2
--- !u!222 &760273396
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 760273393}
m_CullTransparentMesh: 1
--- !u!1 &868125098
GameObject:
m_ObjectHideFlags: 0
@ -581,7 +661,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 2f01e2942ef4ad14588a697df7646921, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Light Red
value: Player Light Red 2
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -791,7 +871,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 9b9cc57300015d24187df4c97811c8dc, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Red
value: Player Dark Red 3
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -1138,7 +1218,7 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: eac04632d0bd30d478787e8eb05be51a, type: 3}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Name
value: Player Dark Blue
value: Player Dark Blue 0
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
@ -1386,15 +1466,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_players:
- {fileID: 261236787}
- {fileID: 1272407095}
- {fileID: 1192266244}
- {fileID: 261236787}
- {fileID: 1003872902}
- {fileID: 1192266244}
_topic1Box: {fileID: 1797572950}
_topic2Box: {fileID: 1500576227}
_topic3Box: {fileID: 18155122}
_title: {fileID: 1225785573}
_subTitle: {fileID: 277092718}
_subTitle2: {fileID: 760273395}
_player1: {fileID: 261236787}
_player2: {fileID: 1272407095}
_player3: {fileID: 1192266244}

37
namedropper/Assets/Scripts/Game.cs

@ -76,7 +76,7 @@ public class Game : Level
StartCoroutine(Countdown());
if (GameManager.Instance.Competitive == false)
if (GameManager.Instance.NumTeams == 1)
{
Score1.gameObject.SetActive(true);
Score2.gameObject.SetActive(false);
@ -160,29 +160,7 @@ public class Game : Level
Topic.gameObject.SetActive(false);
}
void ActivatePlayers(bool value)
{
if (value == false)
{
foreach (GameObject player in _players)
{
player.SetActive(false);
}
}
else //value = true
{
foreach (GameObject player in _players)
{
if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
SceneManager.GetActiveScene().name == "PlayerSelectJoin")
{
player.SetActive(true);
}
}
}
}
IEnumerator Countdown()
{
while (_seconds > 0)
@ -229,21 +207,32 @@ public class Game : Level
{
if (player == 0)
{
if (GameManager.Instance.DoubleBlueScores)
amount *= 2;
GameManager.Instance.Score1 += amount;
_blueScoreStack.AddChecker(amount/10, true);
}
else if (player == 1)
{
if (GameManager.Instance.DoubleBlueScores)
amount *= 2;
_blueScoreStack.AddChecker(amount / 10, false);
GameManager.Instance.Score2 += amount;
}
else if (player == 2)
{
if (GameManager.Instance.DoubleRedScores)
amount *= 2;
_redScoreStack.AddChecker(amount / 10, false);
GameManager.Instance.Score3 += amount;
}
else if (player == 3)
{
if (GameManager.Instance.DoubleRedScores)
amount *= 2;
_redScoreStack.AddChecker(amount / 10, true );
GameManager.Instance.Score4 += amount;
}
@ -270,7 +259,7 @@ public class Game : Level
}
if (GameManager.Instance.Competitive == false) {
if (GameManager.Instance.NumTeams == 1) {
int score = GameManager.Instance.Score1 + GameManager.Instance.Score2 + GameManager.Instance.Score3 + GameManager.Instance.Score4;
Score1.text = score.ToString();
}

21
namedropper/Assets/Scripts/GameManager.cs

@ -17,12 +17,14 @@ public class GameManager
int _score4 = 0;
int _highScore = 0;
int _round = 1;
bool _competitive = true;
public bool[] PlayerJoined = new bool[4];
public static int PLAYER_SKIN = 5; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear, 5==pop
public static int MAX_PLAYER_SKIN = 5;
bool _doubleBlueScores = false;
bool _doubleRedScores = false;
public string GetRoundName()
{
if (Round == 3)
@ -47,6 +49,8 @@ public class GameManager
Score3 = 0;
Score4 = 0;
Round = 1;
DoubleBlueScores = false;
DoubleRedScores = false;
for (int i = 0; i < 4; i++)
{
@ -94,5 +98,18 @@ public class GameManager
return retVal;
}
}
public bool Competitive { get => _competitive; set => _competitive = value; }
public int NumTeams
{
get
{
if ((PlayerJoined[0] || PlayerJoined[1]) && (PlayerJoined[2] || PlayerJoined[3]))
return 2;
else
return 1;
}
}
public bool DoubleBlueScores { get => _doubleBlueScores; set => _doubleBlueScores = value; }
public bool DoubleRedScores { get => _doubleRedScores; set => _doubleRedScores = value; }
}

4
namedropper/Assets/Scripts/GameOverScreen.cs

@ -10,14 +10,14 @@ public class GameOverScreen : MonoBehaviour
void Start()
{
if (GameManager.Instance.Competitive == false) {
if (GameManager.Instance.NumTeams == 1) {
int score = GameManager.Instance.Score1 + GameManager.Instance.Score2 + GameManager.Instance.Score3 + GameManager.Instance.Score4;
if (score > GameManager.Instance.HighScore)
{
GameManager.Instance.HighScore = score;
}
_gameOverMessage.text = "GAME OVER\n\nYour score: " + score + "\nToday's hi-score: " + GameManager.Instance.HighScore.ToString() + "\n\nPress 'R' to replay";
_gameOverMessage.text = "GAME OVER\n\nYour score: " + score + "\nToday's hi-score: " + GameManager.Instance.HighScore.ToString();
}
else
{

8
namedropper/Assets/Scripts/Join.cs

@ -48,15 +48,10 @@ public class Join : MonoBehaviour
_readyKeys.Remove(key);
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
GameManager.Instance.Competitive = false;
StartGame();
}
if (Input.GetKeyDown(KeyCode.Alpha2) || Input.GetMouseButtonDown(0))
{
GameManager.Instance.Competitive = true;
StartGame();
}
@ -88,7 +83,6 @@ public class Join : MonoBehaviour
void StartGame()
{
GameManager.Instance.NumPlayers = NumPlayersReady;
//SceneManager.LoadScene("NumPlayersSelect");
SceneManager.LoadScene("PlayerSelectJoin");
}

77
namedropper/Assets/Scripts/JoinPlayer.cs

@ -60,10 +60,53 @@ public class JoinPlayer : MonoBehaviour
}
void LoadTopicSelect()
{
if (GameManager.Instance.NumPlayers == 0)
{
SceneManager.LoadScene("Title");
}
if (GameManager.Instance.NumPlayers == 2 && GameManager.Instance.PlayerJoined[0] == GameManager.Instance.PlayerJoined[1] && GameManager.Instance.PlayerJoined[2] == GameManager.Instance.PlayerJoined[3])
{
_title.text = "Join on different teams!";
for (int i = 0; i < 4; i++) {
GameManager.Instance.PlayerJoined[i] = false;
}
Invoke("Redo", 2f);
}
else if (GameManager.Instance.NumPlayers == 3){
string color = "blue";
if (GameManager.Instance.PlayerJoined[0] == false || GameManager.Instance.PlayerJoined[1] == false)
{
color = "blue";
GameManager.Instance.DoubleBlueScores = true;
}
else
{
color = "red";
GameManager.Instance.DoubleRedScores = true;
}
_title.text = "Uneven teams!\n\n" + color + " team earns 2x points";
Invoke("GotoTopicSelect", 2f);
}
else
{
GotoTopicSelect();
}
}
void GotoTopicSelect()
{
SceneManager.LoadScene("TopicSelect");
}
void Redo()
{
SceneManager.LoadScene("PlayerSelectJoin");
}
void UpdateTitle()
{
_title.text = "Roll to the box\n";
@ -88,9 +131,43 @@ public class JoinPlayer : MonoBehaviour
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
LoadTopicSelect();
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
_NumPlayersJoined = 1;
GameManager.Instance.PlayerJoined[0] = true;
UpdateTitle();
LoadTopicSelect();
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
_NumPlayersJoined = 2;
GameManager.Instance.PlayerJoined[0] = true;
GameManager.Instance.PlayerJoined[3] = true;
UpdateTitle();
LoadTopicSelect();
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
_NumPlayersJoined = 3;
GameManager.Instance.PlayerJoined[0] = true;
GameManager.Instance.PlayerJoined[1] = true;
GameManager.Instance.PlayerJoined[3] = true;
UpdateTitle();
LoadTopicSelect();
}
if (Input.GetKeyDown(KeyCode.Alpha4))
{
_NumPlayersJoined = 4;
GameManager.Instance.PlayerJoined[0] = true;
GameManager.Instance.PlayerJoined[1] = true;
GameManager.Instance.PlayerJoined[2] = true;
GameManager.Instance.PlayerJoined[3] = true;
UpdateTitle();
LoadTopicSelect();
}

19
namedropper/Assets/Scripts/Level.cs

@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Level : MonoBehaviour
{
@ -19,10 +20,26 @@ public class Level : MonoBehaviour
}
protected void ActivatePlayers(bool value)
{
if (value == false)
{
foreach (GameObject player in _players)
{
player.SetActive(value);
player.SetActive(false);
}
}
else //value = true
{
foreach (GameObject player in _players)
{
if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
SceneManager.GetActiveScene().name == "PlayerSelectJoin")
{
player.SetActive(true);
}
}
}
}

44
namedropper/Assets/Scripts/Player.cs

@ -38,6 +38,7 @@ public class Player : MonoBehaviour
float _originalSpeed;
bool _poweredUp = false;
float _powerupTimeLeft = 0f;
public Player PassInputOnto = null;
public enum Team
{
@ -67,7 +68,7 @@ public class Player : MonoBehaviour
_originalPosition = transform.position;
/*
if (GameManager.Instance.NumPlayers == 1)
{
if (_playerNumber != 1)
@ -85,7 +86,7 @@ public class Player : MonoBehaviour
}
if (_playerNumber == 2 && GameManager.Instance.Competitive)
if (_playerNumber == 2 )
{
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
@ -99,17 +100,17 @@ public class Player : MonoBehaviour
gameObject.SetActive(false);
}
if (_playerNumber == 2 && GameManager.Instance.Competitive)
if (_playerNumber == 2)
{
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
if (_playerNumber == 3 && GameManager.Instance.Competitive)
if (_playerNumber == 3)
{
gameObject.layer = LayerMask.NameToLayer("Team 3");
}
}
else if (GameManager.Instance.NumPlayers == 4 && GameManager.Instance.Competitive)
else if (GameManager.Instance.NumPlayers == 4)
{
//player 1 & 2 remain on team 1
@ -122,6 +123,7 @@ public class Player : MonoBehaviour
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
}
*/
}
void Start()
@ -142,6 +144,20 @@ public class Player : MonoBehaviour
}
}
public void SetName(string name)
{
_text.text = name;
}
public void BecomeInvisible()
{
SetName("");
GameObject.Destroy(GetComponent<Rigidbody2D>());
GameObject.Destroy(GetComponent<CircleCollider2D>());
GameObject.Destroy(transform.Find("sprite").GetComponent<SpriteRenderer>());
GameObject.Destroy(transform.Find("sprite_top").GetComponent<SpriteRenderer>());
}
void SetRandomTextRotation()
{
_text.gameObject.transform.eulerAngles = new Vector3(0f, 0f, Random.Range(-10f, 10f));
@ -233,6 +249,8 @@ public class Player : MonoBehaviour
GameDataManager.Instance.CurrentTopic = topicBox.TopicData;
DisableAllPlayers();
FindObjectOfType<TopicSelect>().HideText();
//destroy the other topics
TopicBox[] topicBoxes = GameObject.FindObjectsOfType<TopicBox>();
foreach (TopicBox tb in topicBoxes)
@ -339,6 +357,14 @@ public class Player : MonoBehaviour
SceneManager.LoadScene("TopicSelect");
}
public void AddVelocity(Vector2 velocity)
{
if (PassInputOnto != null)
PassInputOnto.AddVelocity(velocity);
else
_rigidbody.velocity += velocity;
}
// Update is called once per frame
void Update()
{
@ -366,15 +392,15 @@ public class Player : MonoBehaviour
if (Input.GetKey(_keyLeft))
{
_rigidbody.velocity += new Vector2(_curSpeed * Time.deltaTime * -1f, 0f);
AddVelocity(new Vector2(_curSpeed * Time.deltaTime * -1f, 0f));
}
if (Input.GetKey(_keyRight))
{
_rigidbody.velocity += new Vector2(_curSpeed * Time.deltaTime, 0f);
AddVelocity(new Vector2(_curSpeed * Time.deltaTime, 0f));
}
if (Input.GetKey(_keyDown))
{
_rigidbody.velocity += new Vector2(0f, _curSpeed * Time.deltaTime * -1f);
AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * -1f));
}
if (Input.GetKey(_keyDrop) && ALLOW_DROP)
@ -384,7 +410,7 @@ public class Player : MonoBehaviour
if (_dropping)
{
_rigidbody.velocity += new Vector2(0f, _curSpeed * 5f * Time.deltaTime * -1f);
AddVelocity(new Vector2(0f, _curSpeed * 5f * Time.deltaTime * -1f));
}
_powerupTimeLeft -= Time.deltaTime;

119
namedropper/Assets/Scripts/TopicSelect.cs

@ -3,6 +3,9 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Runtime.ExceptionServices;
public class TopicSelect : Level
{
[SerializeField] TopicBox _topic1Box;
@ -10,21 +13,17 @@ public class TopicSelect : Level
[SerializeField] TopicBox _topic3Box;
[SerializeField] Text _title;
[SerializeField] Text _subTitle;
[SerializeField] Text _subTitle2;
[SerializeField] GameObject _player1;
[SerializeField] GameObject _player2;
[SerializeField] GameObject _player3;
[SerializeField] GameObject _player4;
public const bool WORST_PLAYER_PICKS = true;
public const bool WORST_PLAYER_PICKS = false;
public const bool WORST_TEAM_PICKS = true;
public const bool VOTE_ON_TOPIC = false;
// Start is called before the first frame update
void Awake()
{
InitRound();
StartCoroutine("StartupProcess");
}
@ -32,18 +31,27 @@ public class TopicSelect : Level
IEnumerator StartupProcess()
{
ActivatePlayers(false);
ActivatePlayers(true);
InitRound();
_subTitle.gameObject.SetActive(false);
_subTitle2.gameObject.SetActive(false);
_title.gameObject.SetActive(false);
yield return new WaitForSeconds(.3f);
_title.gameObject.SetActive(true);
yield return new WaitForSeconds(1f);
_subTitle.gameObject.SetActive(true);
yield return new WaitForSeconds(1f);
_subTitle2.gameObject.SetActive(true);
yield return new WaitForSeconds(2f);
/*
_subTitle.text = "";
_title.text = "GO!";
ActivatePlayers(true);
_subTitle2.text = "";
_title.text = "";
*/
//ActivatePlayers(true);
yield return new WaitForSeconds(1f);
_title.gameObject.SetActive(false);
//_title.gameObject.SetActive(false);
}
@ -51,7 +59,84 @@ public class TopicSelect : Level
{
_title.text = GameManager.Instance.GetRoundName();
if (WORST_PLAYER_PICKS)
if (WORST_TEAM_PICKS && GameManager.Instance.NumTeams > 1)
{
bool bluePicks = false;
ScoreStack blueScoreStack = GameObject.Find("/ScoreStackBlue").GetComponent<ScoreStack>();
ScoreStack redScoreStack = GameObject.Find("/ScoreStackRed").GetComponent<ScoreStack>();
string titleText = "<color=blue>" + blueScoreStack.Score + "</color><color=white> to </color><color=red>" + redScoreStack.Score + "</color>\n";
string text = "";
string text2 = "";
string first = "";
if (blueScoreStack.Score > redScoreStack.Score)
{
text += "<color=blue>Blue team is in the lead\n</color>";
bluePicks = false;
}
else if (redScoreStack.Score > blueScoreStack.Score)
{
text += "<color=red>Red team is in the lead\n</color>";
bluePicks = true;
}
else
{
bluePicks = Random.Range(0, 2) == 1;
if (blueScoreStack.Score + redScoreStack.Score == 0)
{
//first round
titleText = "Welcome to ICON";
first = "first ";
}
else
{
text += "<color=white>TIE!</color>\n";
}
}
if (bluePicks)
{
text2 = "<color=blue>Blue team picks the " + first + "topic</color>";
if (GameManager.Instance.PlayerJoined[0])
{
_players[0].GetComponent<Player>().SetName("blue team");
_players[1].GetComponent<Player>().BecomeInvisible();
_players[1].GetComponent<Player>().PassInputOnto = _players[0].GetComponent<Player>();
}
else
{
_players[1].GetComponent<Player>().SetName("blue team");
}
_players[2].SetActive(false);
_players[3].SetActive(false);
}
else //red picks
{
text2 = "<color=red>Red team picks the " + first + "topic</color>";
if (GameManager.Instance.PlayerJoined[2])
{
_players[2].GetComponent<Player>().SetName("red team");
_players[3].GetComponent<Player>().BecomeInvisible();
_players[3].GetComponent<Player>().PassInputOnto = _players[2].GetComponent<Player>();
}
else
{
_players[3].GetComponent<Player>().SetName("red team");
}
_players[0].SetActive(false);
_players[1].SetActive(false);
}
_title.text = titleText;
_subTitle.text = text;
_subTitle2.text = text2;
}
else if (WORST_PLAYER_PICKS)
{
string worstPlayerName = "";
int worstScore = int.MaxValue;
@ -82,6 +167,7 @@ public class TopicSelect : Level
worstPlayerNumber = 3;
}
/*
if (worstPlayerNumber != 0)
GameObject.Destroy(_player1);
if (worstPlayerNumber != 1)
@ -90,6 +176,7 @@ public class TopicSelect : Level
GameObject.Destroy(_player3);
if (worstPlayerNumber != 3)
GameObject.Destroy(_player4);
*/
_subTitle.text = worstPlayerName + "\nmay pick the topic";
}
@ -99,7 +186,9 @@ public class TopicSelect : Level
}
else
{
_title.text = "";
_subTitle.text = "Pick a topic!";
_subTitle2.text = "";
}
_topic1Box.TopicData = GameDataManager.Instance.GetRandomTopicData();
@ -177,6 +266,14 @@ public class TopicSelect : Level
PickTopic(topicBox);
}
public void HideText()
{
_title.text = "";
_subTitle.text = "";
_subTitle2.text = "";
}
public static void PickTopic(TopicBox topicBox)
{
GameDataManager.Instance.CurrentTopic = topicBox.TopicData;

3
namedropper/Assets/Scripts/TrackballInputManager.cs

@ -168,7 +168,8 @@ public class TrackballInputManager : MonoBehaviour
//use this method to move using position
//player.transform.position = new Vector2(player.transform.position.x + dx, player.transform.position.y - dy);
//use this method to move using velocity
player._rigidbody.velocity += new Vector2(dx, -dy);
player.AddVelocity(new Vector2(dx, -dy));
}
else
{

246
namedropper/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save