diff --git a/playable/Assets/Objects/Countdown_1.fbx.meta b/playable/Assets/Objects/Countdown_1.fbx.meta new file mode 100644 index 0000000..a74b423 --- /dev/null +++ b/playable/Assets/Objects/Countdown_1.fbx.meta @@ -0,0 +1,65 @@ +fileFormatVersion: 2 +guid: db60cfcccbdf7e045bd35f0b306026ac +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Text + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/Objects/Countdown_2.fbx.meta b/playable/Assets/Objects/Countdown_2.fbx.meta new file mode 100644 index 0000000..9f1370c --- /dev/null +++ b/playable/Assets/Objects/Countdown_2.fbx.meta @@ -0,0 +1,65 @@ +fileFormatVersion: 2 +guid: 9264b6fdf0f58774b8e600f4075b32aa +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Text + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/Objects/Countdown_3.fbx.meta b/playable/Assets/Objects/Countdown_3.fbx.meta new file mode 100644 index 0000000..753bdae --- /dev/null +++ b/playable/Assets/Objects/Countdown_3.fbx.meta @@ -0,0 +1,65 @@ +fileFormatVersion: 2 +guid: 82ad2bb10edd24a45bfc106ba4e19586 +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Text + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/Objects/Countdown_4.fbx.meta b/playable/Assets/Objects/Countdown_4.fbx.meta new file mode 100644 index 0000000..2e873f5 --- /dev/null +++ b/playable/Assets/Objects/Countdown_4.fbx.meta @@ -0,0 +1,65 @@ +fileFormatVersion: 2 +guid: 84befc063e48108498c02fbc1d515774 +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Text + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/Objects/Countdown_5.fbx.meta b/playable/Assets/Objects/Countdown_5.fbx.meta new file mode 100644 index 0000000..1525023 --- /dev/null +++ b/playable/Assets/Objects/Countdown_5.fbx.meta @@ -0,0 +1,65 @@ +fileFormatVersion: 2 +guid: f8fc2b0c59a93394ea107abb040df918 +ModelImporter: + serializedVersion: 16 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Text + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .00999999978 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + additionalBone: 0 + userData: diff --git a/playable/Assets/Scenes/Level1.unity b/playable/Assets/Scenes/Level1.unity index 280014b..ea34696 100644 Binary files a/playable/Assets/Scenes/Level1.unity and b/playable/Assets/Scenes/Level1.unity differ diff --git a/playable/Assets/Scripts/menuContrller.cs b/playable/Assets/Scripts/menuContrller.cs index d4cecf0..37109e1 100644 --- a/playable/Assets/Scripts/menuContrller.cs +++ b/playable/Assets/Scripts/menuContrller.cs @@ -21,7 +21,6 @@ public class menuContrller : MonoBehaviour { // Update is called once per frame void Update () { - } public void panelSelect (string panel){ diff --git a/playable/Assets/Scripts/playerController.cs b/playable/Assets/Scripts/playerController.cs index cd3c353..b3cb158 100644 --- a/playable/Assets/Scripts/playerController.cs +++ b/playable/Assets/Scripts/playerController.cs @@ -15,7 +15,7 @@ public class playerController : MonoBehaviour { public GameObject newConfetti; //confetti when hit public GameObject newCandy; public stickController stick; //controller for stick - public GUIText scoreDisplay; + public GameObject scoreDisplay; public GUIText gameOverDisplay; public GameObject dashDisplay; public GameObject playerFrac; @@ -37,6 +37,7 @@ public class playerController : MonoBehaviour { public bool dead = false; public float heartTimer = 0.0f; public int maxScore = 10; + public bool debugHeartUpdate = false; @@ -144,7 +145,7 @@ public class playerController : MonoBehaviour { private void displayHealth(){ - if (displayedHealth != health) //check if health needs updating + if (displayedHealth != health || debugHeartUpdate) //check if health needs updating updateHealth = true; if (updateHealth){ @@ -157,15 +158,8 @@ public class playerController : MonoBehaviour { Vector3 heartPos = new Vector3 (); //set position - if (healthPos.x == 1) - heartPos.x = (i * 0.033f); - else - heartPos.x = 1-(i * 0.033f); - - if (healthPos.y == 1) - heartPos.y = 0.95f; - else - heartPos.y = 0.05f; + heartPos.x = (healthPos.x + i * 0.033f); + heartPos.y = healthPos.y; heartCanister.transform.position = heartPos; hearts.Add(heartCanister); //adds heart to list @@ -360,7 +354,7 @@ public class playerController : MonoBehaviour { { Destroy (trig.gameObject, 0.0f); score++; - scoreDisplay.text = "score: " + score.ToString (); + scoreDisplay.GetComponent().text = "score: " + score.ToString (); } }