diff --git a/GDDImagineGame/Assets/Team2/Prefabs/Player.prefab b/GDDImagineGame/Assets/Team2/Prefabs/Player.prefab index 90d0d64..3fe4cf6 100644 --- a/GDDImagineGame/Assets/Team2/Prefabs/Player.prefab +++ b/GDDImagineGame/Assets/Team2/Prefabs/Player.prefab @@ -105,3 +105,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6443632a6d5aeba4c96a823bed9abb34, type: 3} m_Name: m_EditorClassIdentifier: + score: 0 + choice: 5 + potButton: 0 + stealButton: 0 + blockButton: 0 + stealLeft: 0 + stealAcross: 0 + stealRight: 0 diff --git a/GDDImagineGame/Assets/Team2/scenes/PennyPinchersMainScene.unity b/GDDImagineGame/Assets/Team2/scenes/PennyPinchersMainScene.unity index 18f5210..d258ca5 100644 --- a/GDDImagineGame/Assets/Team2/scenes/PennyPinchersMainScene.unity +++ b/GDDImagineGame/Assets/Team2/scenes/PennyPinchersMainScene.unity @@ -224,7 +224,7 @@ RectTransform: m_Children: - {fileID: 1805040154} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -406,6 +406,136 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0} +--- !u!1 &312272805 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 312272806} + m_Layer: 0 + m_Name: PlayerPiles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &312272806 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312272805} + 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: + - {fileID: 1659346374} + - {fileID: 685567538} + - {fileID: 340912541} + - {fileID: 651593479} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &340912540 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 312272806} + m_Modifications: + - target: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_Name + value: Player Three Pile + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.x + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ec1f48a9c17540640a22691bf211467c, type: 3} +--- !u!4 &340912541 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 340912540} + m_PrefabAsset: {fileID: 0} +--- !u!1 &340912542 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 340912540} + m_PrefabAsset: {fileID: 0} --- !u!1 &428008810 GameObject: m_ObjectHideFlags: 0 @@ -563,6 +693,198 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &651593478 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 312272806} + m_Modifications: + - target: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_Name + value: Player Four Pile + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.z + value: -7 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ec1f48a9c17540640a22691bf211467c, type: 3} +--- !u!4 &651593479 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 651593478} + m_PrefabAsset: {fileID: 0} +--- !u!1 &651593480 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 651593478} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &685567537 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 312272806} + m_Modifications: + - target: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_Name + value: Player Two Pile + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.z + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ec1f48a9c17540640a22691bf211467c, type: 3} +--- !u!4 &685567538 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 685567537} + m_PrefabAsset: {fileID: 0} +--- !u!1 &685567539 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 685567537} + m_PrefabAsset: {fileID: 0} --- !u!1001 &741822260 PrefabInstance: m_ObjectHideFlags: 0 @@ -747,6 +1069,12 @@ MonoBehaviour: - {fileID: 1522733017} - {fileID: 1175170419} - {fileID: 64169715} + coinPiles: + - {fileID: 1659346375} + - {fileID: 685567539} + - {fileID: 340912542} + - {fileID: 651593480} + pot: {fileID: 2042638233} timerText: {fileID: 1805040155} timeToChoose: 5 potValue: 10 @@ -877,6 +1205,36 @@ PrefabInstance: propertyPath: m_Name value: Player One objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: potButton + value: 113 + objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: stealButton + value: 119 + objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: blockButton + value: 101 + objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: stealLeft + value: 276 + objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: stealAcross + value: 273 + objectReference: {fileID: 0} + - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, + type: 3} + propertyPath: stealRight + value: 275 + objectReference: {fileID: 0} - target: {fileID: 3433337596703189776, guid: 82734d121651e644081af68b67e6b645, type: 3} propertyPath: m_LocalPosition.x @@ -932,36 +1290,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: potButton - value: 113 - objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: stealButton - value: 119 - objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: blockButton - value: 101 - objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: stealLeft - value: 276 - objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: stealAcross - value: 273 - objectReference: {fileID: 0} - - target: {fileID: -3222763401902802492, guid: 82734d121651e644081af68b67e6b645, - type: 3} - propertyPath: stealRight - value: 275 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 82734d121651e644081af68b67e6b645, type: 3} --- !u!4 &1603432932 stripped @@ -1004,6 +1332,102 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1659346373 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 312272806} + m_Modifications: + - target: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_Name + value: Player One Pile + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.x + value: -7 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + propertyPath: m_LocalScale.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ec1f48a9c17540640a22691bf211467c, type: 3} +--- !u!4 &1659346374 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 1659346373} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1659346375 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 1659346373} + m_PrefabAsset: {fileID: 0} --- !u!1 &1805040153 GameObject: m_ObjectHideFlags: 0 @@ -1095,6 +1519,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6443632a6d5aeba4c96a823bed9abb34, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &2042638233 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, + type: 3} + m_PrefabInstance: {fileID: 2088653255} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2088653255 PrefabInstance: m_ObjectHideFlags: 0 @@ -1105,7 +1535,7 @@ PrefabInstance: - target: {fileID: 1813527851782636589, guid: ec1f48a9c17540640a22691bf211467c, type: 3} propertyPath: m_Name - value: Coin + value: Dragon's Horde objectReference: {fileID: 0} - target: {fileID: 338036885544786708, guid: ec1f48a9c17540640a22691bf211467c, type: 3} diff --git a/GDDImagineGame/Assets/Team2/scripts/manager.cs b/GDDImagineGame/Assets/Team2/scripts/Manager.cs similarity index 64% rename from GDDImagineGame/Assets/Team2/scripts/manager.cs rename to GDDImagineGame/Assets/Team2/scripts/Manager.cs index 855b91b..b415c82 100644 --- a/GDDImagineGame/Assets/Team2/scripts/manager.cs +++ b/GDDImagineGame/Assets/Team2/scripts/Manager.cs @@ -6,6 +6,12 @@ public class Manager : MonoBehaviour // Provides access to all four players public PlayerController[] players; + // Provides access to the coin piles of the four players + public GameObject[] coinPiles; + + // Provides access to the main "pot" (dragon horde, w/e) + public GameObject pot; + // The Text object that displays the time remaining in the round public Text timerText; @@ -29,7 +35,10 @@ public class Manager : MonoBehaviour // Keeps track of elapsed game time private float timer; - + + // Amount to scale a pile by + private float pileScale; + void Start() { timer = 0; @@ -79,39 +88,43 @@ void Update() switch (choices[i]) { case Choice.StealLeft: - target = (i - 1) % 4; + target = ((i - 1) % 4 + 4) % 4; break; case Choice.StealAcross: - target = (i + 2) % 4; + target = ((i + 2) % 4 + 4) % 4; break; case Choice.StealRight: - target = (i + 1) % 4; + target = ((i + 1) % 4 + 4) % 4; break; } - - //ignore if the chosen player is blocking, otherwise give half of score to player stealing + // Ignore if the chosen player is blocking, otherwise give half of score to player stealing if (choices[target] != Choice.Block) { int half = (int)Mathf.Ceil(players[target].score / 2); players[i].score += half; - players[target].score -= half; - } - } + players[target].score -= half; + pileScale = (float)(half * 0.1); + coinPiles[i].transform.localScale += new Vector3(pileScale, pileScale, pileScale); + coinPiles[target].transform.localScale -= new Vector3(pileScale, pileScale, pileScale); + } + } } // Only one player went for the pot, give them pot value if (potNum == 1) { players[potPlayerNum].score += potValue; - } + pileScale = (float)(potValue * 0.1); + coinPiles[potPlayerNum].transform.localScale += new Vector3(pileScale, pileScale, pileScale); + } - //After resolving choices and updating scores, check to see if the game would end here - //reset players choices and give them some pity money - foreach (PlayerController pc in players) + // Reset players choices and give them some pity money + for (int i = 0; i < players.Length; i++) { - pc.choice = Choice.None; - pc.score += 1; - Debug.Log(pc.name + "'s score is: " + pc.score); + players[i].choice = Choice.None; + players[i].score += 1; + coinPiles[i].transform.localScale += new Vector3(0.1f, 0.1f, 0.1f); + Debug.Log(players[i].name + "'s score is: " + players[i].score); } // Increase round number @@ -124,11 +137,13 @@ void Update() return; } - // Increase pot value + // Increase pot value and size potValue += potIncrease; + pileScale = (float)(potIncrease * 0.1); + pot.transform.localScale += new Vector3(pileScale, pileScale, pileScale); - // Reset timer - timer = 0.0f; + // Reset timer + timer = 0.0f; } } diff --git a/GDDImagineGame/Assets/Team2/scripts/manager.cs.meta b/GDDImagineGame/Assets/Team2/scripts/Manager.cs.meta similarity index 100% rename from GDDImagineGame/Assets/Team2/scripts/manager.cs.meta rename to GDDImagineGame/Assets/Team2/scripts/Manager.cs.meta diff --git a/GDDImagineGame/Assets/Team2/scripts/PlayerController.cs b/GDDImagineGame/Assets/Team2/scripts/PlayerController.cs index e3ce0ac..59fbe8f 100644 --- a/GDDImagineGame/Assets/Team2/scripts/PlayerController.cs +++ b/GDDImagineGame/Assets/Team2/scripts/PlayerController.cs @@ -16,7 +16,7 @@ public class PlayerController : MonoBehaviour // Player's current score public int score; - // Player's action for this round + // Player's action for any given round public Choice choice; // The keys this player must press to perform various actions @@ -29,7 +29,7 @@ public class PlayerController : MonoBehaviour void Start() { - //initialize some vars + // Initialize player vars score = 0; choice = Choice.None; } @@ -44,16 +44,16 @@ void Update() /// public void PlayerAction() { - //only let player make choice if none have been made yet + // Only let player make choice if none has been made yet if (choice == Choice.None) { - //player wants to go for pot + // Player wants to go for pot if (Input.GetKeyDown(potButton)) { Debug.Log(name + " is going for main pot"); choice = Choice.Pot; } - //player wants to go for a steal, handle who they're trying to steal from + // Player wants to go for a steal, handle who they're trying to steal from else if (Input.GetKey(stealButton)) { if (Input.GetKeyDown(stealLeft)) @@ -72,10 +72,10 @@ public void PlayerAction() choice = Choice.StealRight; } } - //player wants to block + // Player wants to block else if (Input.GetKeyDown(blockButton)) { - Debug.Log(name + " is going for blocking"); + Debug.Log(name + " is blocking"); choice = Choice.Block; } }