diff --git a/Assets/Prefabs/extinguisher.prefab b/Assets/Prefabs/extinguisher.prefab index dff01085d700c4feca351e3181d58a2d118d146d..4c296aa1c0bea11693a086f4a276072c22cd4a92 100644 --- a/Assets/Prefabs/extinguisher.prefab +++ b/Assets/Prefabs/extinguisher.prefab @@ -26,13 +26,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 836299710778053083} serializedVersion: 2 - m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -1.6, y: -2.8, z: -0.4} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: -1.6, y: 0.2, z: -2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2140468118705131016} - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} --- !u!198 &271574366033552408 ParticleSystem: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/TestMovement.unity b/Assets/Scenes/TestMovement.unity index 15d51a8a3712a834b4299d4ff7c991163c9df67a..5f2e147f597e3ade84062bb7781de5a50bfa63df 100644 --- a/Assets/Scenes/TestMovement.unity +++ b/Assets/Scenes/TestMovement.unity @@ -3257,6 +3257,10 @@ PrefabInstance: propertyPath: m_Name value: extinguisher objectReference: {fileID: 0} + - target: {fileID: 5943070958037994730, guid: d6f71a072d0de754da29b25411179453, type: 3} + propertyPath: activeSpeed + value: 9999 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/GM.cs b/Assets/Scripts/GM.cs index 67ade82dbd3a31a59cdc970d7756df76b1d56b5e..4d74d6fa42762d05d92c63d91c4ced1a33e0eb0c 100644 --- a/Assets/Scripts/GM.cs +++ b/Assets/Scripts/GM.cs @@ -110,6 +110,13 @@ public static void trackPoints(ObjectPoints obj) trackingObjects.Add(tracker); } + public static void instantPoints(int points) + { + var tracker = Instantiate(pointPre, canvasTransform).GetComponent<PointTracker>(); + tracker.points = points; + combo++; + } + public static IEnumerator AddScore(PointTracker source, float basePoints) { int points = (int)source.points; diff --git a/Assets/Scripts/Objects/Extinguisher.cs b/Assets/Scripts/Objects/Extinguisher.cs index 1fe949201e19ca30ef5e8c79b4ae528ced8a6a58..59bccbb404bd8da187734848f94078a3b5248790 100644 --- a/Assets/Scripts/Objects/Extinguisher.cs +++ b/Assets/Scripts/Objects/Extinguisher.cs @@ -36,7 +36,12 @@ void Update() { lifetime -= Time.deltaTime; myBod.velocity = transform.forward * currentRandomTime; - if (lifetime <= 0f) { myBod.useGravity = true; } + Debug.Log(myBod.velocity); + if (lifetime <= 0f) + { + myBod.useGravity = true; + if (smoke) { var s = smoke.emission; s.enabled = false; } + } else { if (currentRandomTime > 0f) diff --git a/Assets/Scripts/Objects/ObjectHealth.cs b/Assets/Scripts/Objects/ObjectHealth.cs index c31e49badeb68f9abcf9eff62af287e1fc9b8638..81a4c9a0dc1d28ef0ca5d940fcbec984c6992f2d 100644 --- a/Assets/Scripts/Objects/ObjectHealth.cs +++ b/Assets/Scripts/Objects/ObjectHealth.cs @@ -17,6 +17,8 @@ public class ObjectHealth : MonoBehaviour private GameObject broken1; private GameObject broken2; + [Range(1,100)]public int breakScore; + /// <summary> /// Meant to be called by Cats code that's dealing with launching the items /// </summary> @@ -40,6 +42,8 @@ public void Damage(float damage) { //Maybe we want a cracked material on it if its damaged but won't break, we would do that here } + + GM.instantPoints(breakScore); } }