From 2de96f8f04bbadf018c7e01251d87716a88a848e Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Sun, 10 Sep 2017 10:56:59 +1000 Subject: [PATCH 1/6] Added Rigidbody2D variable type Fixed indentlevel for EventHandler:DrawProperties Added Playground to the FungusExamples Added Vector3 FungusCommands - Fields, Normalise, Convert to Vector2, Arithetic Added TransformProperty FungusCommand -Get an Set a transform's fields and properties./ -Does not currently support rotation, localRotation nor the Mat4x4 commands as we do not have the appropriate FungusVariables to store them in Added FungusCommand to Reload Current Scene Added Rigidbody2D FungusCommands - AddForce, AddTorque, StopMotion Added Input GetAxis fungusCommand, fetch Input.GetAxis and store in a FloatData SpawnObject FungusCommand now can store the gameobject it instantiates and can spawn at itself Destroy FungusCommand can now be told to pass down a delay to Destroy Updated Docs with all changes and addtions --- Assets/Fungus/Scripts/Commands/Destroy.cs | 17 +- Assets/Fungus/Scripts/Commands/Input.meta | 9 + .../Fungus/Scripts/Commands/Input/GetAxis.cs | 52 + .../Scripts/Commands/Input/GetAxis.cs.meta | 12 + .../Fungus/Scripts/Commands/Rigidbody2D.meta | 9 + .../Commands/Rigidbody2D/AddForce2D.cs | 76 + .../Commands/Rigidbody2D/AddForce2D.cs.meta | 12 + .../Commands/Rigidbody2D/AddTorque2D.cs | 49 + .../Commands/Rigidbody2D/AddTorque2D.cs.meta | 12 + .../Rigidbody2D/StopMotionRigidBody2D.cs | 61 + .../Rigidbody2D/StopMotionRigidBody2D.cs.meta | 12 + Assets/Fungus/Scripts/Commands/Scene.meta | 9 + .../Scripts/Commands/Scene/ReloadScene.cs | 35 + .../Commands/Scene/ReloadScene.cs.meta | 12 + Assets/Fungus/Scripts/Commands/SpawnObject.cs | 33 +- Assets/Fungus/Scripts/Commands/Transform.meta | 9 + .../Commands/Transform/TransformProperty.cs | 209 + .../Transform/TransformProperty.cs.meta | 12 + Assets/Fungus/Scripts/Commands/Vector3.meta | 9 + .../Commands/Vector3/Vector3Arithmetic.cs | 74 + .../Vector3/Vector3Arithmetic.cs.meta | 12 + .../Scripts/Commands/Vector3/Vector3Fields.cs | 67 + .../Commands/Vector3/Vector3Fields.cs.meta | 12 + .../Commands/Vector3/Vector3Normalise.cs | 40 + .../Commands/Vector3/Vector3Normalise.cs.meta | 12 + .../Commands/Vector3/Vector3ToVector2.cs | 44 + .../Commands/Vector3/Vector3ToVector2.cs.meta | 12 + .../Scripts/Editor/EventHandlerEditor.cs | 3 + .../Fungus/Scripts/Editor/VariableEditor.cs | 6 +- .../VariableTypes/Rigidbody2DVariable.cs | 56 + .../VariableTypes/Rigidbody2DVariable.cs.meta | 12 + Assets/FungusExamples/Playground.meta | 9 + .../FungusExamples/Playground/Defender.meta | 9 + .../FungusExamples/Playground/Defender.unity | 1985 ++++++++ .../Playground/Defender.unity.meta | 8 + .../Playground/Defender/Cannon.prefab | 749 +++ .../Playground/Defender/Cannon.prefab.meta | 9 + .../Playground/Defender/Circle.png | Bin 0 -> 78 bytes .../Playground/Defender/Circle.png.meta | 330 ++ .../Playground/Defender/Enemy.prefab | 542 +++ .../Playground/Defender/Enemy.prefab.meta | 9 + .../Defender/EnemyDieParticle.prefab | 3362 +++++++++++++ .../Defender/EnemyDieParticle.prefab.meta | 9 + .../Playground/Defender/Hexagon.png | Bin 0 -> 78 bytes .../Playground/Defender/Hexagon.png.meta | 74 + .../Playground/Defender/Laser.prefab | 633 +++ .../Playground/Defender/Laser.prefab.meta | 9 + .../Playground/Defender/Spawner.prefab | 365 ++ .../Playground/Defender/Spawner.prefab.meta | 9 + .../Playground/Defender/Square.png | Bin 0 -> 78 bytes .../Playground/Defender/Square.png.meta | 72 + .../Playground/Defender/Triangle.png | Bin 0 -> 78 bytes .../Playground/Defender/Triangle.png.meta | 71 + .../FungusExamples/Playground/Football.meta | 9 + .../FungusExamples/Playground/Football.unity | 2898 +++++++++++ .../Playground/Football.unity.meta | 8 + .../Football/Bouncy.physicsMaterial2D | 10 + .../Football/Bouncy.physicsMaterial2D.meta | 9 + .../Playground/Football/LeftGoal.prefab | 208 + .../Playground/Football/LeftGoal.prefab.meta | 9 + .../Playground/Football/P1.prefab | 490 ++ .../Playground/Football/P1.prefab.meta | 9 + Assets/FungusExamples/Playground/Lander.unity | 4259 +++++++++++++++++ .../Playground/Lander.unity.meta | 8 + Docs/Docs.mdproj | 5 + Docs/command_ref/input_commands.md | 15 + Docs/command_ref/rigidbody2d_commands.md | 39 + Docs/command_ref/scene_commands.md | 13 + Docs/command_ref/scripting_commands.md | 7 +- Docs/command_ref/transform_commands.md | 16 + Docs/command_ref/vector3_commands.md | 49 + Docs/top_pages/command_reference.md | 5 + 72 files changed, 17306 insertions(+), 13 deletions(-) create mode 100644 Assets/Fungus/Scripts/Commands/Input.meta create mode 100644 Assets/Fungus/Scripts/Commands/Input/GetAxis.cs create mode 100644 Assets/Fungus/Scripts/Commands/Input/GetAxis.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D.meta create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs create mode 100644 Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Scene.meta create mode 100644 Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs create mode 100644 Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Transform.meta create mode 100644 Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs create mode 100644 Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Vector3.meta create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs create mode 100644 Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs.meta create mode 100644 Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs create mode 100644 Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs.meta create mode 100644 Assets/FungusExamples/Playground.meta create mode 100644 Assets/FungusExamples/Playground/Defender.meta create mode 100644 Assets/FungusExamples/Playground/Defender.unity create mode 100644 Assets/FungusExamples/Playground/Defender.unity.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Cannon.prefab create mode 100644 Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Circle.png create mode 100644 Assets/FungusExamples/Playground/Defender/Circle.png.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Enemy.prefab create mode 100644 Assets/FungusExamples/Playground/Defender/Enemy.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab create mode 100644 Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Hexagon.png create mode 100644 Assets/FungusExamples/Playground/Defender/Hexagon.png.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Laser.prefab create mode 100644 Assets/FungusExamples/Playground/Defender/Laser.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Spawner.prefab create mode 100644 Assets/FungusExamples/Playground/Defender/Spawner.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Square.png create mode 100644 Assets/FungusExamples/Playground/Defender/Square.png.meta create mode 100644 Assets/FungusExamples/Playground/Defender/Triangle.png create mode 100644 Assets/FungusExamples/Playground/Defender/Triangle.png.meta create mode 100644 Assets/FungusExamples/Playground/Football.meta create mode 100644 Assets/FungusExamples/Playground/Football.unity create mode 100644 Assets/FungusExamples/Playground/Football.unity.meta create mode 100644 Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D create mode 100644 Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D.meta create mode 100644 Assets/FungusExamples/Playground/Football/LeftGoal.prefab create mode 100644 Assets/FungusExamples/Playground/Football/LeftGoal.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Football/P1.prefab create mode 100644 Assets/FungusExamples/Playground/Football/P1.prefab.meta create mode 100644 Assets/FungusExamples/Playground/Lander.unity create mode 100644 Assets/FungusExamples/Playground/Lander.unity.meta create mode 100644 Docs/command_ref/input_commands.md create mode 100644 Docs/command_ref/rigidbody2d_commands.md create mode 100644 Docs/command_ref/scene_commands.md create mode 100644 Docs/command_ref/transform_commands.md create mode 100644 Docs/command_ref/vector3_commands.md diff --git a/Assets/Fungus/Scripts/Commands/Destroy.cs b/Assets/Fungus/Scripts/Commands/Destroy.cs index 5aa4615f..f380c9db 100644 --- a/Assets/Fungus/Scripts/Commands/Destroy.cs +++ b/Assets/Fungus/Scripts/Commands/Destroy.cs @@ -9,23 +9,30 @@ namespace Fungus /// /// Destroys a specified game object in the scene. /// - [CommandInfo("Scripting", - "Destroy", + [CommandInfo("Scripting", + "Destroy", "Destroys a specified game object in the scene.")] [AddComponentMenu("")] [ExecuteInEditMode] public class Destroy : Command - { + { [Tooltip("Reference to game object to destroy")] [SerializeField] protected GameObjectData _targetGameObject; + [Tooltip("Optional delay given to destroy")] + [SerializeField] + protected FloatData destroyInXSeconds = new FloatData(0); + #region Public members public override void OnEnter() { if (_targetGameObject.Value != null) { - Destroy(_targetGameObject.Value); + if (destroyInXSeconds.Value != 0) + Destroy(_targetGameObject, destroyInXSeconds.Value); + else + Destroy(_targetGameObject.Value); } Continue(); @@ -38,7 +45,7 @@ namespace Fungus return "Error: No game object selected"; } - return _targetGameObject.Value.name; + return _targetGameObject.Value.name + (destroyInXSeconds.Value == 0 ? "" : " in " + destroyInXSeconds.Value.ToString()); } public override Color GetButtonColor() diff --git a/Assets/Fungus/Scripts/Commands/Input.meta b/Assets/Fungus/Scripts/Commands/Input.meta new file mode 100644 index 00000000..8d13dfad --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Input.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90098f8abed37d1418f36896e7e1279d +folderAsset: yes +timeCreated: 1503744400 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs new file mode 100644 index 00000000..652763e4 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs @@ -0,0 +1,52 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Store Input.GetAxis in a variable + /// + [CommandInfo("Input", + "GetAxis", + "Store Input.GetAxis in a variable")] + [AddComponentMenu("")] + public class GetAxis : Command + { + [SerializeField] + protected StringData axisName; + + [Tooltip("If true, calls GetAxisRaw instead of GetAxis")] + [SerializeField] + protected bool axisRaw = false; + + [Tooltip("Float to store the value of the GetAxis")] + [SerializeField] + protected FloatData outValue; + + public override void OnEnter() + { + if(axisRaw) + { + outValue.Value = Input.GetAxisRaw(axisName.Value); + } + else + { + outValue.Value = Input.GetAxis(axisName.Value); + } + + Continue(); + } + + public override string GetSummary() + { + return axisName + (axisRaw ? " Raw" : ""); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs.meta b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs.meta new file mode 100644 index 00000000..3c3eef2f --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bb18ee740f55ba24680c15466ff13ece +timeCreated: 1503744409 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D.meta b/Assets/Fungus/Scripts/Commands/Rigidbody2D.meta new file mode 100644 index 00000000..8f473125 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 168ad11319df4784eaaf28cf8e564365 +folderAsset: yes +timeCreated: 1503731365 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs new file mode 100644 index 00000000..345d5985 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs @@ -0,0 +1,76 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Add force to a Rigidbody2D + /// + [CommandInfo("Rigidbody2D", + "AddForce2D", + "Add force to a Rigidbody2D")] + [AddComponentMenu("")] + public class AddForce2D : Command + { + [SerializeField] + protected Rigidbody2DData rb; + + [SerializeField] + protected ForceMode2D forceMode = ForceMode2D.Force; + + public enum ForceFunction + { + AddForce, + AddForceAtPosition, + AddRelativeForce + } + + [SerializeField] + protected ForceFunction forceFunction = ForceFunction.AddForce; + + [Tooltip("Vector of force to be added")] + [SerializeField] + protected Vector2Data force; + + [Tooltip("Scale factor to be applied to force as it is used.")] + [SerializeField] + protected FloatData forceScaleFactor = new FloatData(1); + + [Tooltip("World position the force is being applied from. Used only in AddForceAtPosition")] + [SerializeField] + protected Vector2Data atPosition; + + public override void OnEnter() + { + switch (forceFunction) + { + case ForceFunction.AddForce: + rb.Value.AddForce(force.Value * forceScaleFactor.Value, forceMode); + break; + case ForceFunction.AddForceAtPosition: + rb.Value.AddForceAtPosition(force.Value * forceScaleFactor.Value, atPosition.Value, forceMode); + break; + case ForceFunction.AddRelativeForce: + rb.Value.AddRelativeForce(force.Value * forceScaleFactor.Value, forceMode); + break; + default: + break; + } + + + Continue(); + } + + public override string GetSummary() + { + return forceMode.ToString() + ": " + force.ToString(); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs.meta b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs.meta new file mode 100644 index 00000000..f0b09f1e --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 59927941e3d79be4dac4408058904465 +timeCreated: 1503094848 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs new file mode 100644 index 00000000..e84b3441 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs @@ -0,0 +1,49 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Add Torque to a Rigidbody2D + /// + [CommandInfo("Rigidbody2D", + "AddTorque2D", + "Add Torque to a Rigidbody2D")] + [AddComponentMenu("")] + public class AddTorque2D : Command + { + [SerializeField] + protected Rigidbody2DData rb; + + [SerializeField] + protected ForceMode2D forceMode = ForceMode2D.Force; + + [Tooltip("Amount of torque to be added")] + [SerializeField] + protected FloatData force; + + public override void OnEnter() + { + rb.Value.AddTorque(force.Value, forceMode); + + Continue(); + } + + public override string GetSummary() + { + if(rb.Value == null) + { + return "Error: rb not set"; + } + + return forceMode.ToString() + ": " + force.Value.ToString() + (force.floatRef != null ? " (" + force.floatRef.Key + ")" : ""); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs.meta b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs.meta new file mode 100644 index 00000000..07ab3da3 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 42fb61d4cee69b244bcf4fcc8e4ae28b +timeCreated: 1503744011 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs new file mode 100644 index 00000000..aafe1c8d --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs @@ -0,0 +1,61 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Stop velocity and angular velocity on a Rigidbody2D + /// + [CommandInfo("Rigidbody2D", + "StopMotion2D", + "Stop velocity and angular velocity on a Rigidbody2D")] + [AddComponentMenu("")] + public class StopMotionRigidBody2D : Command + { + [SerializeField] + protected Rigidbody2DData rb; + + public enum Motion + { + Velocity, + AngularVelocity, + AngularAndLinearVelocity + } + + [SerializeField] + protected Motion motionToStop = Motion.AngularAndLinearVelocity; + + public override void OnEnter() + { + switch (motionToStop) + { + case Motion.Velocity: + rb.Value.velocity = Vector2.zero; + break; + case Motion.AngularVelocity: + rb.Value.angularVelocity = 0; + break; + case Motion.AngularAndLinearVelocity: + rb.Value.angularVelocity = 0; + rb.Value.velocity = Vector2.zero; + break; + default: + break; + } + + Continue(); + } + + public override string GetSummary() + { + return motionToStop.ToString(); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs.meta b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs.meta new file mode 100644 index 00000000..07fd7833 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bd2e830ee16360d418acee50d83c9c13 +timeCreated: 1504225685 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Scene.meta b/Assets/Fungus/Scripts/Commands/Scene.meta new file mode 100644 index 00000000..f19e680f --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Scene.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c625aa42f45f484cb2a4f4bef7adede +folderAsset: yes +timeCreated: 1501237083 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs b/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs new file mode 100644 index 00000000..76161593 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +namespace Fungus +{ + /// + /// Reload the current scene + /// + [CommandInfo("Scene", + "Reload", + "Reload the current scene")] + [AddComponentMenu("")] + public class ReloadScene : Command + { + [Tooltip("Image to display while loading the scene")] + [SerializeField] + protected Texture2D loadingImage; + + public override void OnEnter() + { + SceneLoader.LoadScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name, loadingImage); + + Continue(); + } + + public override string GetSummary() + { + return ""; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs.meta b/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs.meta new file mode 100644 index 00000000..c1c1fc63 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Scene/ReloadScene.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9c784b19efbe8424fa879e0d6d883281 +timeCreated: 1501237128 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/SpawnObject.cs b/Assets/Fungus/Scripts/Commands/SpawnObject.cs index 734243f3..5e101ca2 100644 --- a/Assets/Fungus/Scripts/Commands/SpawnObject.cs +++ b/Assets/Fungus/Scripts/Commands/SpawnObject.cs @@ -19,15 +19,24 @@ namespace Fungus [Tooltip("Game object to copy when spawning. Can be a scene object or a prefab.")] [SerializeField] protected GameObjectData _sourceObject; - [Tooltip("Transform to use for position of newly spawned object.")] + [Tooltip("Transform to use as parent during instantiate.")] [SerializeField] protected TransformData _parentTransform; + [Tooltip("If true, will use the Transfrom of this Flowchart for the position and rotation.")] + [SerializeField] protected BooleanData _spawnAtSelf = new BooleanData(false); + [Tooltip("Local position of newly spawned object.")] [SerializeField] protected Vector3Data _spawnPosition; [Tooltip("Local rotation of newly spawned object.")] [SerializeField] protected Vector3Data _spawnRotation; + + + [Tooltip("Optional variable to store the GameObject that was just created.")] + [SerializeField] + protected GameObjectData _newlySpawnedObject; + #region Public members public override void OnEnter() @@ -38,14 +47,28 @@ namespace Fungus return; } - GameObject newObject = GameObject.Instantiate(_sourceObject.Value); + GameObject newObject = null; + if (_parentTransform.Value != null) { - newObject.transform.parent = _parentTransform.Value; + newObject = GameObject.Instantiate(_sourceObject.Value,_parentTransform.Value); + } + else + { + newObject = GameObject.Instantiate(_sourceObject.Value); + } + + if (!_spawnAtSelf.Value) + { + newObject.transform.localPosition = _spawnPosition.Value; + newObject.transform.localRotation = Quaternion.Euler(_spawnRotation.Value); + } + else + { + newObject.transform.SetPositionAndRotation(transform.position, transform.rotation); } - newObject.transform.localPosition = _spawnPosition.Value; - newObject.transform.localRotation = Quaternion.Euler(_spawnRotation.Value); + _newlySpawnedObject.Value = newObject; Continue(); } diff --git a/Assets/Fungus/Scripts/Commands/Transform.meta b/Assets/Fungus/Scripts/Commands/Transform.meta new file mode 100644 index 00000000..7eb641ce --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Transform.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f7ddb80a0487d1342b36129da32ad1f6 +folderAsset: yes +timeCreated: 1503815490 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs new file mode 100644 index 00000000..31fe8cab --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs @@ -0,0 +1,209 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Get or Set a property of a transform component + /// + [CommandInfo("Transform", + "Property", + "Get or Set a property of a transform component")] + [AddComponentMenu("")] + public class TransformProperty : Command + { + public enum GetSet + { + Get, + Set, + } + public GetSet getOrSet = GetSet.Get; + + public enum Property + { + ChildCount, + EulerAngles, + Forward, + HasChanged, + HierarchyCapacity, + HierarchyCount, + LocalEulerAngles, + LocalPosition, + LocalScale, + LossyScale, + Parent, + Position, + Right, + Root, + Up, + //no quat or mat4 yet + //LocalRotation, + //Rotation, + //LocalToWorldMatrix, + //WorldToLocalMatrix + } + [SerializeField] + protected Property property = Property.Position; + + [SerializeField] + protected TransformData transformData; + + [SerializeField] + [VariableProperty(typeof(BooleanVariable), + typeof(IntegerVariable), + typeof(Vector3Variable), + typeof(TransformVariable))] + protected Variable inOutVar; + + public override void OnEnter() + { + var iob = inOutVar as BooleanVariable; + var ioi = inOutVar as IntegerVariable; + var iov = inOutVar as Vector3Variable; + var iot = inOutVar as TransformVariable; + + var t = transformData.Value; + + switch (getOrSet) + { + case GetSet.Get: + switch (property) + { + case Property.ChildCount: + ioi.Value = t.childCount; + break; + case Property.EulerAngles: + iov.Value = t.eulerAngles; + break; + case Property.Forward: + iov.Value = t.forward; + break; + case Property.HasChanged: + iob.Value = t.hasChanged; + break; + case Property.HierarchyCapacity: + ioi.Value = t.hierarchyCapacity; + break; + case Property.HierarchyCount: + ioi.Value = t.hierarchyCount; + break; + case Property.LocalEulerAngles: + iov.Value = t.localEulerAngles; + break; + case Property.LocalPosition: + iov.Value = t.localPosition; + break; + case Property.LocalScale: + iov.Value = t.localScale; + break; + case Property.LossyScale: + iov.Value = t.lossyScale; + break; + case Property.Parent: + iot.Value = t.parent; + break; + case Property.Position: + iov.Value = t.position; + break; + case Property.Right: + iov.Value = t.right; + break; + case Property.Root: + iot.Value = t.parent; + break; + case Property.Up: + iov.Value = t.up; + break; + default: + break; + } + break; + case GetSet.Set: + switch (property) + { + case Property.ChildCount: + Debug.LogWarning("Cannot Set childCount, it is read only"); + break; + case Property.EulerAngles: + t.eulerAngles = iov.Value; + break; + case Property.Forward: + t.forward = iov.Value; + break; + case Property.HasChanged: + t.hasChanged = iob.Value; + break; + case Property.HierarchyCapacity: + t.hierarchyCapacity = ioi.Value; + break; + case Property.HierarchyCount: + Debug.LogWarning("Cannot Set HierarchyCount, it is read only"); + break; + case Property.LocalEulerAngles: + t.localEulerAngles = iov.Value; + break; + case Property.LocalPosition: + t.localPosition = iov.Value; + break; + case Property.LocalScale: + t.localScale = iov.Value; + break; + case Property.LossyScale: + Debug.LogWarning("Cannot Set LossyScale, it is read only"); + break; + case Property.Parent: + t.parent = iot.Value; + break; + case Property.Position: + t.position = iov.Value; + break; + case Property.Right: + t.right = iov.Value; + break; + case Property.Root: + Debug.LogWarning("Cannot Set Root, it is read only"); + break; + case Property.Up: + t.up = iov.Value; + break; + default: + break; + } + break; + default: + break; + } + + Continue(); + } + + public override string GetSummary() + { + if(transformData.Value == null) + { + return "Error: no transform set"; + } + + var iob = inOutVar as BooleanVariable; + var ioi = inOutVar as IntegerVariable; + var iov = inOutVar as Vector3Variable; + var iot = inOutVar as TransformVariable; + + if(iob == null && ioi == null && iov == null && iot == null) + { + return "Error: no variable set to push or pull data to or from"; + } + + //We could do further checks here, eg, you have selected childcount but set a vec3variable + + return getOrSet.ToString() + " " + property.ToString(); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs.meta b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs.meta new file mode 100644 index 00000000..a3fd7b3c --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2fb064de1b711a449845627f19b7f7b1 +timeCreated: 1504942828 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Vector3.meta b/Assets/Fungus/Scripts/Commands/Vector3.meta new file mode 100644 index 00000000..70aff798 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9c57d4347eae5354b8bcf942c2b3468a +folderAsset: yes +timeCreated: 1503030603 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs new file mode 100644 index 00000000..0ed0bd28 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs @@ -0,0 +1,74 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + /// + /// Vector3 add, sub, mul, div arithmetic + /// + [CommandInfo("Vector3", + "Arithmetic", + "Vector3 add, sub, mul, div arithmetic")] + [AddComponentMenu("")] + public class Vector3Arithmetic : Command + { + [SerializeField] + protected Vector3Data lhs, rhs, output; + + public enum Operation + { + Add, + Sub, + Mul, + Div + } + + [SerializeField] + protected Operation operation = Operation.Add; + + public override void OnEnter() + { + Vector3 tmp; + switch (operation) + { + case Operation.Add: + output.Value = lhs.Value + rhs.Value; + break; + case Operation.Sub: + output.Value = lhs.Value - rhs.Value; + break; + case Operation.Mul: + tmp = lhs.Value; + tmp.Scale(rhs.Value); + output.Value = tmp; + break; + case Operation.Div: + tmp = lhs.Value; + tmp.Scale(new Vector3(1.0f / rhs.Value.x, + 1.0f / rhs.Value.y, + 1.0f / rhs.Value.z)); + output.Value = tmp; + break; + default: + break; + } + Continue(); + } + + public override string GetSummary() + { + if(output.vector3Ref == null) + { + return "Error: no output set"; + } + + return operation.ToString() + ": stored in " + output.vector3Ref.Key; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs.meta b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs.meta new file mode 100644 index 00000000..c9a97be1 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dfc8e8d5ce363ec43815496d321b4d55 +timeCreated: 1503313996 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs new file mode 100644 index 00000000..427ae24f --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs @@ -0,0 +1,67 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Get or Set the x,y,z fields of a vector3 via floatvars + /// + [CommandInfo("Vector3", + "Fields", + "Get or Set the x,y,z fields of a vector3 via floatvars")] + [AddComponentMenu("")] + public class Vector3Fields : Command + { + public enum GetSet + { + Get, + Set, + } + public GetSet getOrSet = GetSet.Get; + + [SerializeField] + protected Vector3Data vec3; + + [SerializeField] + protected FloatData x, y, z; + + public override void OnEnter() + { + switch (getOrSet) + { + case GetSet.Get: + + var v = vec3.Value; + + x.Value = v.x; + y.Value = v.y; + z.Value = v.z; + break; + case GetSet.Set: + vec3.Value = new Vector3(x.Value, y.Value, z.Value); + break; + default: + break; + } + + Continue(); + } + + public override string GetSummary() + { + if(vec3.vector3Ref == null) + { + return "Error: vec3 not set"; + } + + return getOrSet.ToString() + " (" + vec3.vector3Ref.Key + ")"; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs.meta b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs.meta new file mode 100644 index 00000000..84af4e70 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 96fb07b07bec30544a6c3c01df5345ee +timeCreated: 1504933522 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs new file mode 100644 index 00000000..a02164b4 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs @@ -0,0 +1,40 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Normalise a vector3, output can be the same as the input + /// + [CommandInfo("Vector3", + "Normalise", + "Normalise a Vector3")] + [AddComponentMenu("")] + public class Vector3Normalise : Command + { + [SerializeField] + protected Vector3Data vec3In, vec3Out; + + public override void OnEnter() + { + vec3Out.Value = vec3In.Value.normalized; + + Continue(); + } + + public override string GetSummary() + { + if (vec3Out.vector3Ref == null) + return ""; + else + return vec3Out.vector3Ref.Key; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs.meta b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs.meta new file mode 100644 index 00000000..3088262c --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b9c975313c082cd43a310bfd62ebb893 +timeCreated: 1504171804 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs new file mode 100644 index 00000000..d7709ca9 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Fungus +{ + // + /// Convert fungus vec3 to vec2 + /// + [CommandInfo("Vector3", + "ToVector2", + "Convert Fungus Vector3 to Fungus Vector2")] + [AddComponentMenu("")] + public class Vector3ToVector2 : Command + { + [SerializeField] + protected Vector3Data vec3; + + + [SerializeField] + protected Vector2Data vec2; + + public override void OnEnter() + { + vec2.Value = vec3.Value; + + Continue(); + } + + public override string GetSummary() + { + if(vec3.vector3Ref != null && vec2.vector2Ref != null) + return "Converting " + vec3.vector3Ref.Key + " to " + vec2.vector2Ref.Key; + + return "Error: variables not set"; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs.meta b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs.meta new file mode 100644 index 00000000..2f6ea5fb --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d3b374d347ec80647b7c01956f291a84 +timeCreated: 1504171432 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs b/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs index 12978d87..7bd49673 100644 --- a/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs +++ b/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs @@ -11,6 +11,7 @@ namespace Fungus.EditorUtils { protected virtual void DrawProperties() { + EditorGUI.indentLevel++; SerializedProperty iterator = serializedObject.GetIterator(); bool enterChildren = true; while (iterator.NextVisible(enterChildren)) @@ -24,6 +25,8 @@ namespace Fungus.EditorUtils EditorGUILayout.PropertyField(iterator, true, new GUILayoutOption[0]); } + + EditorGUI.indentLevel--; } protected virtual void DrawHelpBox() diff --git a/Assets/Fungus/Scripts/Editor/VariableEditor.cs b/Assets/Fungus/Scripts/Editor/VariableEditor.cs index 588c78f0..7acf938b 100644 --- a/Assets/Fungus/Scripts/Editor/VariableEditor.cs +++ b/Assets/Fungus/Scripts/Editor/VariableEditor.cs @@ -348,5 +348,9 @@ namespace Fungus.EditorUtils [CustomPropertyDrawer (typeof(AudioSourceData))] public class AudioSourceDrawer : VariableDataDrawer - {} + { } + + [CustomPropertyDrawer(typeof(Rigidbody2DData))] + public class Rigidbody2DDataDrawer : VariableDataDrawer + { } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs b/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs new file mode 100644 index 00000000..f48d6dcb --- /dev/null +++ b/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs @@ -0,0 +1,56 @@ +using UnityEngine; + +namespace Fungus +{ + /// + /// Rigidbody2D variable type. + /// + [VariableInfo("Other", "Rigidbody2D")] + [AddComponentMenu("")] + [System.Serializable] + public class Rigidbody2DVariable : VariableBase + { } + + /// + /// Container for a Rigidbody2D variable reference or constant value. + /// + [System.Serializable] + public struct Rigidbody2DData + { + [SerializeField] + [VariableProperty("", typeof(Rigidbody2DVariable))] + public Rigidbody2DVariable rigidbody2DRef; + + [SerializeField] + public Rigidbody2D rigidbody2DVal; + + public static implicit operator Rigidbody2D(Rigidbody2DData rigidbody2DData) + { + return rigidbody2DData.Value; + } + + public Rigidbody2DData(Rigidbody2D v) + { + rigidbody2DVal = v; + rigidbody2DRef = null; + } + + public Rigidbody2D Value + { + get { return (rigidbody2DRef == null) ? rigidbody2DVal : rigidbody2DRef.Value; } + set { if (rigidbody2DRef == null) { rigidbody2DVal = value; } else { rigidbody2DRef.Value = value; } } + } + + public string GetDescription() + { + if (rigidbody2DRef == null) + { + return rigidbody2DVal.ToString(); + } + else + { + return rigidbody2DRef.Key; + } + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs.meta new file mode 100644 index 00000000..86a46332 --- /dev/null +++ b/Assets/Fungus/Scripts/VariableTypes/Rigidbody2DVariable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5571f032eb722324fac0fc908bc370bc +timeCreated: 1503034530 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Playground.meta b/Assets/FungusExamples/Playground.meta new file mode 100644 index 00000000..6b17a948 --- /dev/null +++ b/Assets/FungusExamples/Playground.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c75bf47559b6c8d4ebdb49a2d664f1dd +folderAsset: yes +timeCreated: 1502968127 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Playground/Defender.meta b/Assets/FungusExamples/Playground/Defender.meta new file mode 100644 index 00000000..24dfc125 --- /dev/null +++ b/Assets/FungusExamples/Playground/Defender.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d53118d44e845714086fd3c871a9b755 +folderAsset: yes +timeCreated: 1503314586 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Playground/Defender.unity b/Assets/FungusExamples/Playground/Defender.unity new file mode 100644 index 00000000..5da00645 --- /dev/null +++ b/Assets/FungusExamples/Playground/Defender.unity @@ -0,0 +1,1985 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &69847124 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 69847129} + - component: {fileID: 69847128} + - component: {fileID: 69847127} + - component: {fileID: 69847126} + - component: {fileID: 69847125} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &69847125 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 69847124} + m_Enabled: 1 +--- !u!124 &69847126 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 69847124} + m_Enabled: 1 +--- !u!92 &69847127 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 69847124} + m_Enabled: 1 +--- !u!20 &69847128 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 69847124} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &69847129 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 69847124} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &119136498 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 119136499} + - component: {fileID: 119136502} + - component: {fileID: 119136501} + - component: {fileID: 119136500} + m_Layer: 5 + m_Name: GameOver + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &119136499 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 119136498} + 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: 884575237} + 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: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &119136500 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 119136498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 1, g: 1, b: 1, a: 0.5} + m_EffectDistance: {x: 0.5, y: 0.5} + m_UseGraphicAlpha: 1 +--- !u!114 &119136501 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 119136498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 48 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 48 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &119136502 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 119136498} +--- !u!1001 &370424553 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.size + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 114094183539183980, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: selectedBlocks.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114094183539183980, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: selectedCommands.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalPosition.x + value: -0.02 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalPosition.y + value: 6.4 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4839343606506310, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 114094183539183980, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: selectedBlocks.Array.data[0] + value: + objectReference: {fileID: 1124881222} + - target: {fileID: 114094183539183980, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: selectedCommands.Array.data[0] + value: + objectReference: {fileID: 1398202838} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.data[5] + value: + objectReference: {fileID: 1398202840} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.data[6] + value: + objectReference: {fileID: 1124881218} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.data[7] + value: + objectReference: {fileID: 1398202839} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.data[8] + value: + objectReference: {fileID: 1398202839} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: commandList.Array.data[4] + value: + objectReference: {fileID: 1398202838} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: nodeRect.x + value: 211 + objectReference: {fileID: 0} + - target: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + propertyPath: nodeRect.y + value: 137 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 114170397803954806, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &435850186 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 435850190} + - component: {fileID: 435850189} + - component: {fileID: 435850188} + - component: {fileID: 435850187} + m_Layer: 5 + m_Name: Score + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &435850187 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 435850186} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 1, g: 1, b: 1, a: 0.5} + m_EffectDistance: {x: 0.5, y: 0.5} + m_UseGraphicAlpha: 1 +--- !u!114 &435850188 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 435850186} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &435850189 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 435850186} +--- !u!224 &435850190 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 435850186} + 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: 884575237} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -20, y: -20} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 1, y: 1} +--- !u!1001 &545255773 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.size + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 114116014992790474, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: selectedBlocks.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114116014992790474, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: selectedCommands.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalPosition.y + value: -3 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 114987963891140428, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: value + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 114499702294427518, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: value + value: 0.4 + objectReference: {fileID: 0} + - target: {fileID: 114116014992790474, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: selectedBlocks.Array.data[0] + value: + objectReference: {fileID: 1624045262} + - target: {fileID: 114567745504451066, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: nodeRect.x + value: 277 + objectReference: {fileID: 0} + - target: {fileID: 114567745504451066, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: nodeRect.y + value: 210 + objectReference: {fileID: 0} + - target: {fileID: 114116014992790474, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: selectedCommands.Array.data[0] + value: + objectReference: {fileID: 1624045238} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[3] + value: + objectReference: {fileID: 1624045238} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[4] + value: + objectReference: {fileID: 1624045258} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[5] + value: + objectReference: {fileID: 1624045252} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[6] + value: + objectReference: {fileID: 1624045250} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[7] + value: + objectReference: {fileID: 1624045253} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[8] + value: + objectReference: {fileID: 1624045253} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[9] + value: + objectReference: {fileID: 1624045253} + - target: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + propertyPath: commandList.Array.data[2] + value: + objectReference: {fileID: 1624045237} + m_RemovedComponents: + - {fileID: 114797075761082608, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + - {fileID: 114611752584720384, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: 5db9b59ebaddb664eac17f8dd52f454a, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &884575236 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 884575237} + - component: {fileID: 884575240} + - component: {fileID: 884575239} + - component: {fileID: 884575238} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &884575237 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884575236} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1234006341} + - {fileID: 435850190} + - {fileID: 119136499} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &884575238 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884575236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &884575239 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884575236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &884575240 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884575236} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &1124881218 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114533871774847328, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: bb3e86f556e074b84af1cc7eb8f8e5e7, type: 3} +--- !u!114 &1124881222 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114158188752211888, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} +--- !u!1 &1234006340 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1234006341} + - component: {fileID: 1234006344} + - component: {fileID: 1234006343} + - component: {fileID: 1234006342} + m_Layer: 5 + m_Name: Health + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1234006341 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1234006340} + 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: 884575237} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 20, y: -20} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1234006342 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1234006340} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 1, g: 1, b: 1, a: 0.5} + m_EffectDistance: {x: 0.5, y: 0.5} + m_UseGraphicAlpha: 1 +--- !u!114 &1234006343 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1234006340} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1234006344 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1234006340} +--- !u!1 &1267026863 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1267026864} + - component: {fileID: 1267026880} + - component: {fileID: 1267026878} + - component: {fileID: 1267026875} + - component: {fileID: 1267026874} + - component: {fileID: 1267026873} + - component: {fileID: 1267026872} + - component: {fileID: 1267026871} + - component: {fileID: 1267026870} + - component: {fileID: 1267026869} + - component: {fileID: 1267026868} + - component: {fileID: 1267026884} + - component: {fileID: 1267026883} + - component: {fileID: 1267026882} + - component: {fileID: 1267026881} + - component: {fileID: 1267026867} + - component: {fileID: 1267026866} + - component: {fileID: 1267026865} + - component: {fileID: 1267026887} + - component: {fileID: 1267026886} + - component: {fileID: 1267026885} + - component: {fileID: 1267026888} + - component: {fileID: 1267026891} + - component: {fileID: 1267026890} + - component: {fileID: 1267026889} + - component: {fileID: 1267026876} + - component: {fileID: 1267026879} + - component: {fileID: 1267026877} + - component: {fileID: 1267026893} + - component: {fileID: 1267026892} + - component: {fileID: 1267026895} + - component: {fileID: 1267026894} + m_Layer: 5 + m_Name: GameRules + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1267026864 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + 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: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1267026865 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea6e8f632db87477eb750446b28d73a3, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 12 + indentLevel: 1 + commenterName: + commentText: game over it, show ui, pause and t +--- !u!114 &1267026866 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 11 + indentLevel: 0 +--- !u!114 &1267026867 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 10 + indentLevel: 0 + compareOperator: 0 + variable: {fileID: 1267026869} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &1267026868 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + indentLevel: 0 + variable: {fileID: 1267026872} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: 'Score: {$score}' +--- !u!114 &1267026869 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afb91b566ceda411bad1e9d3c3243ecc, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: hp + value: 3 +--- !u!114 &1267026870 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afb91b566ceda411bad1e9d3c3243ecc, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: score + value: 0 +--- !u!114 &1267026871 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + indentLevel: 0 + variable: {fileID: 1267026874} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: '{$hp} : Health' +--- !u!114 &1267026872 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: scoreString + value: +--- !u!114 &1267026873 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c0367bf08d147bd80b5454de50e9d4, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + indentLevel: 0 + targetTextObject: {fileID: 435850186} + text: + stringRef: {fileID: 1267026872} + stringVal: + description: + _textObjectObsolete: {fileID: 0} +--- !u!114 &1267026874 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: healthString + value: +--- !u!114 &1267026875 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c0367bf08d147bd80b5454de50e9d4, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + indentLevel: 0 + targetTextObject: {fileID: 1234006340} + text: + stringRef: {fileID: 1267026874} + stringVal: + description: + _textObjectObsolete: {fileID: 0} +--- !u!114 &1267026876 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1267026878} + waitForFrames: 0 +--- !u!114 &1267026877 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: gameOverString + value: +--- !u!114 &1267026878 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 263 + y: 186 + width: 126 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 1 + blockName: UpdateLabels + description: + eventHandler: {fileID: 1267026876} + commandList: + - {fileID: 1267026871} + - {fileID: 1267026868} + - {fileID: 1267026875} + - {fileID: 1267026873} + - {fileID: 1267026879} +--- !u!114 &1267026879 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c0367bf08d147bd80b5454de50e9d4, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 19 + indentLevel: 0 + targetTextObject: {fileID: 119136498} + text: + stringRef: {fileID: 1267026877} + stringVal: + description: + _textObjectObsolete: {fileID: 0} +--- !u!114 &1267026880 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 + scrollPos: {x: 76, y: -60} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + selectedBlocks: + - {fileID: 1267026878} + selectedCommands: [] + variables: + - {fileID: 1267026874} + - {fileID: 1267026872} + - {fileID: 1267026870} + - {fileID: 1267026869} + - {fileID: 1267026877} + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + showLineNumbers: 0 + hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart +--- !u!114 &1267026881 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + indentLevel: 0 + targetFlowchart: {fileID: 0} + targetBlock: {fileID: 1267026878} + startLabel: + stringRef: {fileID: 0} + stringVal: + startIndex: 0 + callMode: 1 +--- !u!114 &1267026882 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + indentLevel: 0 + variable: {fileID: 1267026869} + setOperator: 3 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 1 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &1267026883 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d7d417659cd54a6787f70f763950c34, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1267026884} + message: EnemyHitGround +--- !u!114 &1267026884 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 47 + y: 157 + width: 162 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 7 + blockName: OnEnemyHitGround + description: + eventHandler: {fileID: 1267026883} + commandList: + - {fileID: 1267026882} + - {fileID: 1267026867} + - {fileID: 1267026865} + - {fileID: 1267026893} + - {fileID: 1267026895} + - {fileID: 1267026866} + - {fileID: 1267026881} +--- !u!114 &1267026885 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 14 + indentLevel: 0 + variable: {fileID: 1267026870} + setOperator: 2 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 1 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &1267026886 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d7d417659cd54a6787f70f763950c34, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1267026887} + message: EnemyShot +--- !u!114 &1267026887 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 64 + y: 222 + width: 131 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 13 + blockName: OnEnemyShot + description: + eventHandler: {fileID: 1267026886} + commandList: + - {fileID: 1267026885} + - {fileID: 1267026891} + - {fileID: 1267026889} + - {fileID: 1267026892} + - {fileID: 1267026894} + - {fileID: 1267026890} + - {fileID: 1267026888} +--- !u!114 &1267026888 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 15 + indentLevel: 0 + targetFlowchart: {fileID: 0} + targetBlock: {fileID: 1267026878} + startLabel: + stringRef: {fileID: 0} + stringVal: + startIndex: 0 + callMode: 1 +--- !u!114 &1267026889 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea6e8f632db87477eb750446b28d73a3, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 18 + indentLevel: 1 + commenterName: + commentText: go to win +--- !u!114 &1267026890 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 17 + indentLevel: 0 +--- !u!114 &1267026891 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 16 + indentLevel: 0 + compareOperator: 5 + variable: {fileID: 1267026870} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 5 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &1267026892 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 21 + indentLevel: 1 + variable: {fileID: 1267026877} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: You Win! +--- !u!114 &1267026893 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 20 + indentLevel: 1 + variable: {fileID: 1267026877} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: Game Over +--- !u!114 &1267026894 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbd8c931f22994b9d90e2037fffaa770, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 23 + indentLevel: 1 + _targetGameObject: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 1398202832} + activeState: + booleanRef: {fileID: 0} + booleanVal: 0 + targetGameObjectOLD: {fileID: 0} +--- !u!114 &1267026895 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1267026863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbd8c931f22994b9d90e2037fffaa770, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 22 + indentLevel: 1 + _targetGameObject: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 1624045236} + activeState: + booleanRef: {fileID: 0} + booleanVal: 0 + targetGameObjectOLD: {fileID: 0} +--- !u!4 &1368181545 stripped +Transform: + m_PrefabParentObject: {fileID: 4244392958347542, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} +--- !u!1 &1398202832 stripped +GameObject: + m_PrefabParentObject: {fileID: 1643320542487702, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} +--- !u!114 &1398202835 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114158483713016934, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: 4d769ea3513ad47aabf805db5252341d, type: 3} +--- !u!114 &1398202836 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114451434740700826, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} +--- !u!114 &1398202837 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114205508981943572, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} +--- !u!114 &1398202838 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1398202832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 96fb07b07bec30544a6c3c01df5345ee, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + indentLevel: 0 + getOrSet: 1 + vec3: + vector3Ref: {fileID: 1398202835} + vector3Val: {x: 0, y: 0, z: 0} + x: + floatRef: {fileID: 1398202837} + floatVal: 0 + y: + floatRef: {fileID: 1398202836} + floatVal: 0 + z: + floatRef: {fileID: 0} + floatVal: 0 +--- !u!114 &1398202839 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114197543733484370, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: ae9ac2fcbd1d542619ab0bc7549fb264, type: 3} +--- !u!114 &1398202840 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114536672983551206, guid: 5192b1b391d8cd54f84d39d06a4a3dc8, + type: 2} + m_PrefabInternal: {fileID: 370424553} + m_Script: {fileID: 11500000, guid: dfc8e8d5ce363ec43815496d321b4d55, type: 3} +--- !u!1 &1569219819 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1569219821} + - component: {fileID: 1569219820} + m_Layer: 0 + m_Name: _FungusState + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1569219820 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1569219819} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} + m_Name: + m_EditorClassIdentifier: + selectedFlowchart: {fileID: 114619489782507194, guid: cf9a0515785714a49b2d12090c78828f, + type: 2} +--- !u!4 &1569219821 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1569219819} + 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: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1617824580 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1617824586} + - component: {fileID: 1617824585} + - component: {fileID: 1617824584} + - component: {fileID: 1617824583} + - component: {fileID: 1617824582} + - component: {fileID: 1617824581} + - component: {fileID: 1617824587} + m_Layer: 0 + m_Name: Ground + m_TagString: Ground + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1617824581 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c43743931d28f43f89eced820d907351, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + indentLevel: 0 + messageTarget: 1 + _message: + stringRef: {fileID: 0} + stringVal: EnemyHitGround + messageOLD: +--- !u!114 &1617824582 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c1a9f24ac376a47838385391f83acc, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1617824583} + tagFilter: + - Enemy + FireOn: 1 +--- !u!114 &1617824583 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 95 + y: 134 + width: 120 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 0 + blockName: New Block + description: + eventHandler: {fileID: 1617824582} + commandList: + - {fileID: 1617824581} +--- !u!114 &1617824584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + selectedBlocks: + - {fileID: 1617824583} + selectedCommands: [] + variables: [] + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + showLineNumbers: 0 + hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart +--- !u!212 &1617824585 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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: 21300000, guid: 3cb7c35a750699348a04840d1ae1be5e, 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 +--- !u!4 &1617824586 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.021000564, y: -4.38, z: 0} + m_LocalScale: {x: 22.5, y: 1.712501, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &1617824587 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1617824580} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!1 &1624045236 stripped +GameObject: + m_PrefabParentObject: {fileID: 1380797001910276, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} +--- !u!114 &1624045237 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1624045236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fb064de1b711a449845627f19b7f7b1, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 16 + indentLevel: 1 + getOrSet: 0 + property: 1 + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 1624045265} + inOutVar: {fileID: 1624045256} +--- !u!114 &1624045238 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1624045236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fb064de1b711a449845627f19b7f7b1, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 15 + indentLevel: 1 + getOrSet: 0 + property: 11 + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 1368181545} + inOutVar: {fileID: 1624045257} +--- !u!114 &1624045250 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114093757454897032, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} +--- !u!114 &1624045252 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114948797197275504, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} +--- !u!114 &1624045253 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114904554220365688, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} +--- !u!114 &1624045256 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114310288066248142, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: 4d769ea3513ad47aabf805db5252341d, type: 3} +--- !u!114 &1624045257 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114476154734915750, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: 4d769ea3513ad47aabf805db5252341d, type: 3} +--- !u!114 &1624045258 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114920461919457924, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: bb3e86f556e074b84af1cc7eb8f8e5e7, type: 3} +--- !u!114 &1624045262 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114980758164341790, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} +--- !u!4 &1624045265 stripped +Transform: + m_PrefabParentObject: {fileID: 4038790522185248, guid: 5db9b59ebaddb664eac17f8dd52f454a, + type: 2} + m_PrefabInternal: {fileID: 545255773} +--- !u!1 &1683342971 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1683342975} + - component: {fileID: 1683342974} + - component: {fileID: 1683342973} + - component: {fileID: 1683342972} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1683342972 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1683342971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &1683342973 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1683342971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1683342974 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1683342971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1683342975 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1683342971} + 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: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/FungusExamples/Playground/Defender.unity.meta b/Assets/FungusExamples/Playground/Defender.unity.meta new file mode 100644 index 00000000..f6ebec30 --- /dev/null +++ b/Assets/FungusExamples/Playground/Defender.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca170c9b80637694daf36db2bbe0e31e +timeCreated: 1502968157 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Playground/Defender/Cannon.prefab b/Assets/FungusExamples/Playground/Defender/Cannon.prefab new file mode 100644 index 00000000..8e077ab9 --- /dev/null +++ b/Assets/FungusExamples/Playground/Defender/Cannon.prefab @@ -0,0 +1,749 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1380797001910276} + m_IsPrefabParent: 1 +--- !u!1 &1380797001910276 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4038790522185248} + - component: {fileID: 212653995144694442} + - component: {fileID: 50078523555390844} + - component: {fileID: 114116014992790474} + - component: {fileID: 114980758164341790} + - component: {fileID: 114036837631678186} + - component: {fileID: 114704119826569804} + - component: {fileID: 114920461919457924} + - component: {fileID: 114476154734915750} + - component: {fileID: 114310288066248142} + - component: {fileID: 114268424750904310} + - component: {fileID: 114945764084547224} + - component: {fileID: 114904554220365688} + - component: {fileID: 114948797197275504} + - component: {fileID: 114499702294427518} + - component: {fileID: 114093757454897032} + - component: {fileID: 114141913385670956} + - component: {fileID: 114567745504451066} + - component: {fileID: 114194947709156218} + - component: {fileID: 114588250137994584} + - component: {fileID: 114987963891140428} + - component: {fileID: 114680196880106302} + - component: {fileID: 114994441961358866} + - component: {fileID: 114110427670967256} + - component: {fileID: 114873397630457622} + - component: {fileID: 114099386588132780} + - component: {fileID: 114238188189624062} + - component: {fileID: 114797075761082608} + - component: {fileID: 114611752584720384} + m_Layer: 0 + m_Name: Cannon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1705922491111948 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4244392958347542} + - component: {fileID: 212746264793356650} + m_Layer: 0 + m_Name: Triangle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4038790522185248 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -3, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 4244392958347542} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4244392958347542 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1705922491111948} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.45, z: 0} + m_LocalScale: {x: 0.8484849, y: 1.1666677, z: 0.8484851} + m_Children: [] + m_Father: {fileID: 4038790522185248} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!50 &50078523555390844 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 10 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 3 +--- !u!114 &114036837631678186 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 000864f8e9e1748a39807861d0e60e29, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 114980758164341790} + keyPressType: 0 + keyCode: 32 +--- !u!114 &114093757454897032 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + indentLevel: 1 + variable: {fileID: 114268424750904310} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 1 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114099386588132780 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 11 + indentLevel: 0 + variable: {fileID: 114680196880106302} + setOperator: 4 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: -1 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114110427670967256 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bb18ee740f55ba24680c15466ff13ece, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + indentLevel: 0 + axisName: + stringRef: {fileID: 0} + stringVal: Horizontal + axisRaw: 0 + outValue: + floatRef: {fileID: 114994441961358866} + floatVal: 0 +--- !u!114 &114116014992790474 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 + scrollPos: {x: 65, y: -130} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + selectedBlocks: [] + selectedCommands: [] + variables: + - {fileID: 114704119826569804} + - {fileID: 114476154734915750} + - {fileID: 114310288066248142} + - {fileID: 114268424750904310} + - {fileID: 114499702294427518} + - {fileID: 114987963891140428} + - {fileID: 114680196880106302} + - {fileID: 114994441961358866} + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + showLineNumbers: 0 + hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart +--- !u!114 &114141913385670956 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + indentLevel: 1 + variable: {fileID: 114268424750904310} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114194947709156218 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2fbef54b0b0adb41ab9b447a8f3cbdb, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 114567745504451066} + FireOn: 2 +--- !u!114 &114238188189624062 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 12 + indentLevel: 0 + variable: {fileID: 114680196880106302} + setOperator: 4 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 114994441961358866} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114268424750904310 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5d02d9822eec54c98afe95bb497211b3, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: CanFire + value: 1 +--- !u!114 &114310288066248142 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d769ea3513ad47aabf805db5252341d, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: spawnRot + value: {x: 0, y: 0, z: 0} +--- !u!114 &114476154734915750 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d769ea3513ad47aabf805db5252341d, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: spawnPos + value: {x: 0, y: 0, z: 0} +--- !u!114 &114499702294427518 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: FireRate + value: 1 +--- !u!114 &114567745504451066 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 121 + y: 291 + width: 120 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 7 + blockName: Rotate + description: + eventHandler: {fileID: 114194947709156218} + commandList: + - {fileID: 114110427670967256} + - {fileID: 114873397630457622} + - {fileID: 114099386588132780} + - {fileID: 114238188189624062} + - {fileID: 114588250137994584} +--- !u!114 &114588250137994584 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 42fb61d4cee69b244bcf4fcc8e4ae28b, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + indentLevel: 0 + rb: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 50078523555390844} + forceMode: 0 + force: + floatRef: {fileID: 114680196880106302} + floatVal: 5 +--- !u!114 &114611752584720384 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b521257e66940a4c835dce2e246e464, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 14 + indentLevel: 1 + property: 11 + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 4244392958347542} + vec3: + vector3Ref: {fileID: 114476154734915750} + vector3Val: {x: 0, y: 0, z: 0} +--- !u!114 &114680196880106302 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: curRotateForce + value: 0 +--- !u!114 &114704119826569804 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 633bea14077b44e19956e8113fbac7a4, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: spawnAtTrans + value: {fileID: 4244392958347542} +--- !u!114 &114797075761082608 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b521257e66940a4c835dce2e246e464, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 13 + indentLevel: 1 + property: 0 + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 4038790522185248} + vec3: + vector3Ref: {fileID: 114310288066248142} + vector3Val: {x: 0, y: 0, z: 0} +--- !u!114 &114873397630457622 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 10 + indentLevel: 0 + variable: {fileID: 114680196880106302} + setOperator: 0 + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 114987963891140428} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114904554220365688 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + indentLevel: 0 +--- !u!114 &114920461919457924 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bb3e86f556e074b84af1cc7eb8f8e5e7, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + indentLevel: 1 + _sourceObject: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 1942691996823588, guid: a63bb7c0f4cb0df429c8364816dc7b20, + type: 2} + _parentTransform: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + _spawnPosition: + vector3Ref: {fileID: 114476154734915750} + vector3Val: {x: 0, y: 0, z: 0} + _spawnRotation: + vector3Ref: {fileID: 114310288066248142} + vector3Val: {x: 0, y: 0, z: 0} + sourceObjectOLD: {fileID: 0} + parentTransformOLD: {fileID: 0} + spawnPositionOLD: {x: 0, y: 0, z: 0} + spawnRotationOLD: {x: 0, y: 0, z: 0} +--- !u!114 &114945764084547224 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 2 + indentLevel: 0 + compareOperator: 0 + variable: {fileID: 114268424750904310} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 1 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &114948797197275504 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + indentLevel: 1 + _duration: + floatRef: {fileID: 114499702294427518} + floatVal: 1 + durationOLD: 0 +--- !u!114 &114980758164341790 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 119 + y: 216 + width: 120 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 0 + blockName: Fire + description: + eventHandler: {fileID: 114036837631678186} + commandList: + - {fileID: 114945764084547224} + - {fileID: 114141913385670956} + - {fileID: 114797075761082608} + - {fileID: 114611752584720384} + - {fileID: 114920461919457924} + - {fileID: 114948797197275504} + - {fileID: 114093757454897032} + - {fileID: 114904554220365688} +--- !u!114 &114987963891140428 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: BaseRotateForce + value: 6 +--- !u!114 &114994441961358866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 705fa1ac97df74e3a84ff952ffd923f1, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: horAxis + value: 0 +--- !u!212 &212653995144694442 +SpriteRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1380797001910276} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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: 21300000, guid: d77e6458673a5ff4080857204d985f54, 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 +--- !u!212 &212746264793356650 +SpriteRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1705922491111948} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + 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: 21300000, guid: 946c61cb65f78df4394947a1ff1fce91, 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 diff --git a/Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta b/Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta new file mode 100644 index 00000000..579b4350 --- /dev/null +++ b/Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5db9b59ebaddb664eac17f8dd52f454a +timeCreated: 1503828198 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Playground/Defender/Circle.png b/Assets/FungusExamples/Playground/Defender/Circle.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb1b1ecc13b6e1d2375151866134cd7a040340c GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=L_J*`LpWrU|M0W$cr!i aF)*;jval%k!i aF)*;jval%k!i aF)*;jval%k!i aF)*;jval%k + + + + + diff --git a/Docs/command_ref/input_commands.md b/Docs/command_ref/input_commands.md new file mode 100644 index 00000000..c226bbc4 --- /dev/null +++ b/Docs/command_ref/input_commands.md @@ -0,0 +1,15 @@ +# Input Commands # {#input_commands} + +Commands that interact with UnityEngine.Input + +[TOC] +# Move # {#Move} +Moves a game object to a specified position over time. Can be either to or from a given target. Can be absolute or additive. + +Defined in Fungus.MoveLean + +Property | Type | Description + --- | --- | --- +axisName | Fungus.StringData | Input Axis name, defined in [InputManager](https://docs.unity3d.com/Manual/class-InputManager.html) +axisRaw | System.Boolean | If true, calls GetAxisRaw instead of GetAxis +outValue | Fungus.FloatData | Float to store the value of the GetAxis. \ No newline at end of file diff --git a/Docs/command_ref/rigidbody2d_commands.md b/Docs/command_ref/rigidbody2d_commands.md new file mode 100644 index 00000000..a4bfc8d9 --- /dev/null +++ b/Docs/command_ref/rigidbody2d_commands.md @@ -0,0 +1,39 @@ +# Rigidbody2D Commands # {#rigidbody2d_commands} + +Commands that interact with [UnityEngine.Rigidbody2D](https://docs.unity3d.com/ScriptReference/Rigidbody2D.html) & Fungus.Rigidbody2DVariable + +[TOC] +# AddTorque2D # {#AddTorque2D} +Add Torque to a Rigidbody2D. + +Defined in Fungus.AddTorque2D + +Property | Type | Description + --- | --- | --- +rb | Fungus.Rigidbody2DData | Targeted rigidbody2d +forceMode | Unity.ForceMode2D | Parameter given to AddTorque +force | Fungus.FloatData | Amount of torque to be added + +# AddForce2D # {#AddForce2D} +Add Force to a Rigidbody2D. + +Defined in Fungus.AddForce2D + +Property | Type | Description + --- | --- | --- +rb | Fungus.Rigidbody2DData | Targeted rigidbody2d +forceMode | Unity.ForceMode2D | Parameter given to AddForce +forceFunction | System.Enum | Which variant of AddForce to use (AddForce,AddForceAtPosition,AddRelativeForce) +force | Fungus.Vector2DData | Amount of torque to be added +forceScaleFactor | Fungus.FloatData | Scale factor to be applied to force as it is used. Default 1. +atPosition | Fungus.Vector2DData | World position the force is being applied from. Used only in AddForceAtPosition + +# StopMotion2D # {#StopMotion2D} +Stop motion or angularmotion or both of a rigidbody2d. + +Defined in Fungus.StopMotion2D + +Property | Type | Description + --- | --- | --- +rb | Fungus.Rigidbody2DData | Targeted rigidbody2d +motionToStop | System.Enum | Which motion to stop (Velocity,AngularVelocity,AngularAndLinearVelocity) \ No newline at end of file diff --git a/Docs/command_ref/scene_commands.md b/Docs/command_ref/scene_commands.md new file mode 100644 index 00000000..2de4d37e --- /dev/null +++ b/Docs/command_ref/scene_commands.md @@ -0,0 +1,13 @@ +# Scene Commands # {#scene_commands} + +Commands that interact with scenes and Unity SceneManagement. + +[TOC] +# Reload # {#Reload} +Reload the current scene + +Defined in Fungus.ReloadScene + +Property | Type | Description + --- | --- | --- +Loading Image | UnityEngine.Texture2D | Image to display while loading the scene \ No newline at end of file diff --git a/Docs/command_ref/scripting_commands.md b/Docs/command_ref/scripting_commands.md index 3c6a530f..415a6f30 100644 --- a/Docs/command_ref/scripting_commands.md +++ b/Docs/command_ref/scripting_commands.md @@ -40,6 +40,7 @@ Defined in Fungus.Destroy Property | Type | Description --- | --- | --- _target Game Object | Fungus.GameObjectData | Reference to game object to destroy +destroyInXSeconds | Fungus.FloatData | Optional delay given to the destroy # Execute Lua # {#ExecuteLua} Executes a Lua code chunk using a Lua Environment. @@ -116,14 +117,16 @@ _target Game Object | Fungus.GameObjectData | Reference to game object to enable Active State | Fungus.BooleanData | Set to true to enable the game object # Spawn Object # {#SpawnObject} -Spawns a new object based on a reference to a scene or prefab game object. +Spawns a new object based on a reference to a scene or prefab game object. Can use the Instantiate parent if desired and can be set to spawn at the same location as the flowchart. Defined in Fungus.SpawnObject Property | Type | Description --- | --- | --- _source Object | Fungus.GameObjectData | Game object to copy when spawning. Can be a scene object or a prefab. -_parent Transform | Fungus.TransformData | Transform to use for position of newly spawned object. +_parent Transform | Fungus.TransformData | Optional, Transform to use as parent of newly spawned object. +_sapwn At Self | Fungus.BooleanData | If true, will use the Transfrom of this Flowchart for the position and rotation. _spawn Position | Fungus.Vector3Data | Local position of newly spawned object. _spawn Rotation | Fungus.Vector3Data | Local rotation of newly spawned object. +_newly Spawned Object | Fungus.GameObjectData | Optional variable to store the GameObject that was just created. diff --git a/Docs/command_ref/transform_commands.md b/Docs/command_ref/transform_commands.md new file mode 100644 index 00000000..01167ef8 --- /dev/null +++ b/Docs/command_ref/transform_commands.md @@ -0,0 +1,16 @@ +# Transform commands # {#transform_commands} + +Commands that interact with and impact the UnityEngine.Transform + +[TOC] +# Property # {#Property} +Fades a sprite to a target color over a period of time. + +Defined in Fungus.TransformProperty + +Property | Type | Description + --- | --- | --- +getOrSet | System.Enum | Get or set the property from the transform +property | System.Enum | Which property are you targeting (ChildCount,EulerAngles,Forward,HasChanged,HierarchyCapacity,HierarchyCount,LocalEulerAngles,LocalPosition,LocalScale,LossyScale,Parent,Position,Right,Root,Up) +transformData | Fungus.TransformData | Target transform. +inOutVar | Fungus.Variable | Variable that is being used to pull data from or push the data to. Can be a bool, int, float or Transform. See (Unity Transform Docs for detials)[https://docs.unity3d.com/ScriptReference/Transform.html] diff --git a/Docs/command_ref/vector3_commands.md b/Docs/command_ref/vector3_commands.md new file mode 100644 index 00000000..9678509f --- /dev/null +++ b/Docs/command_ref/vector3_commands.md @@ -0,0 +1,49 @@ +# Vector3 Commands # {#vector3_commands} + +Commands that interact with and manipulate Fungus.Vector3Variable + +[TOC] +# Arithmetic # {#Arithmetic} +Vector3 add, sub, mul, div arithmetic + +Defined in Fungus.Vector3Arithmetic + +Property | Type | Description + --- | --- | --- +lhs | Fungus.Vector3Data | Left hand side of the operation +rhs | Fungus.Vector3Data | Right hand side of the operation +output | Fungus.Vector3Data | Push result of operation into this variable +operation | System.Enum | Operation to perform (Add,Sub,Mul,Div) + +# Fields # {#Fields} +Get or Set the x,y,z fields of a vector3 via floatvars + +Defined in Fungus.Vector3Fields + +Property | Type | Description + --- | --- | --- +getOrSet | System.Enum | Get or Set the fields of the Vector3. +vec3 | Fungus.Vector3Data | Target Vector3. +x | Fungus.FloatData | x field. +y | Fungus.FloatData | y field. +z | Fungus.FloatData | z field. + +# Normalise # {#Normalise} +Normalise a vector3, output can be the same as the input. + +Defined in Fungus.Vector3Normalise + +Property | Type | Description + --- | --- | --- +vec3In | Fungus.Vector3Data | Vector3 data to be normalised. +vec3Out | Fungus.Vector3Data | Vector3 to store result of normalisation. + +# ToVector2 # {#ToVector2} +Convert Fungus Vector3 to Fungus Vector2. + +Defined in Fungus.Vector3ToVector2 + +Property | Type | Description + --- | --- | --- +vec3 | Fungus.Vector3Data | Vector3 data to be normalised. +vec2 | Fungus.Vector3Data | Vector2 to store result of normalisation. \ No newline at end of file diff --git a/Docs/top_pages/command_reference.md b/Docs/top_pages/command_reference.md index a1516823..4943b988 100644 --- a/Docs/top_pages/command_reference.md +++ b/Docs/top_pages/command_reference.md @@ -7,12 +7,17 @@ This is the reference documentation for all %Fungus commands. * @subpage camera_commands * @subpage flow_commands * @subpage itween_commands +* @subpage input_commands * @subpage leanTween_commands * @subpage math_commands * @subpage narrative_commands +* @subpage rigidbody2d_commands +* @subpage scene_commands * @subpage scripting_commands * @subpage sprite_commands +* @subpage transform_commands * @subpage variable_commands +* @subpage vector3_commands * @subpage ui_commands * @subpage tests_commands From 22d03583f2076361a3afc7516e1e2191dfe68812 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Sun, 10 Sep 2017 11:12:50 +1000 Subject: [PATCH 2/6] Updated changelog back to 3.6.0 --- Docs/fungus_docs/change_log.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Docs/fungus_docs/change_log.md b/Docs/fungus_docs/change_log.md index 60e8ed16..6ca32b21 100644 --- a/Docs/fungus_docs/change_log.md +++ b/Docs/fungus_docs/change_log.md @@ -2,6 +2,40 @@ Changelog {#changelog} ========= [TOC] +v3.6.1 {#v3_6_1} +====== + +## Added +- Rigidbody2D Fungus Variable +- Added Playground FungusExamples that demonstrate the use of Rigidbody2D, input, vectors and transforms. +- Vector3 commands for modifying fields, normalising & arithetic +- Added TransformProperty command, gets and sets Transform fields and properties +- Added ReloadScene command +- Added Rigidbody2D commands, AddForce, AddTorque, StopMotion +- Added GetAxis command to fetch Input.GetAxis into a float variable +- Added Math Commands +- Added MathQuiz Example scene +- Added MonoBehaviour Events +- Added MonoBehaviour Example Scene +- Added LeanTween Commands for Move, Scale, Rotate +- Added LeanTween Example Scene +- Added ability to type name of desired command in text box below the block editor +- Added hierarchy icon for all GameObjects with a flowchart on them +- Added FungusEditorPreferences these can currently toggle off the hierarchy icons. + +## Changed +- Spawn Object can now return the gameobject made via a Fungus GameObject variable & calls the best matching version of Instantiate +- Destroy command now supports a destroy delay +- Updated project to Unity 2017.1.0 +- SayDialog public SpeakingCharacter property +- BlockEditor name to BlockName +- CameraManager now tracks the pan and fade coroutines independantly + +## Fixed +- EventHandler now correctly indents its properties +- If CustomEditor changed to VariableConditionEditor + + v3.6.0 {#v3_6_0} ====== From de566924ad11af1132883206045149644e55e755 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Mon, 25 Sep 2017 19:30:34 +1000 Subject: [PATCH 3/6] Updated Input Axes Removed missing monoscript from Football scene --- .../FungusExamples/Playground/Football.unity | 37 ++----- ProjectSettings/InputManager.asset | 100 ++++++++++++++---- 2 files changed, 89 insertions(+), 48 deletions(-) diff --git a/Assets/FungusExamples/Playground/Football.unity b/Assets/FungusExamples/Playground/Football.unity index da641e39..0e9ef072 100644 --- a/Assets/FungusExamples/Playground/Football.unity +++ b/Assets/FungusExamples/Playground/Football.unity @@ -250,7 +250,6 @@ GameObject: - component: {fileID: 53095177} - component: {fileID: 53095178} - component: {fileID: 53095176} - - component: {fileID: 53095179} - component: {fileID: 53095172} - component: {fileID: 53095180} - component: {fileID: 53095160} @@ -688,9 +687,8 @@ MonoBehaviour: width: 0 height: 0 selectedBlocks: - - {fileID: 53095162} - selectedCommands: - - {fileID: 53095181} + - {fileID: 53095145} + selectedCommands: [] variables: - {fileID: 53095153} - {fileID: 53095152} @@ -724,7 +722,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &53095158 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 53095135} @@ -738,7 +736,7 @@ MonoBehaviour: value: {x: 0, y: 0, z: 0} --- !u!114 &53095159 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 53095135} @@ -752,7 +750,7 @@ MonoBehaviour: value: {x: -5, y: 0, z: 0} --- !u!114 &53095160 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 53095135} @@ -991,7 +989,6 @@ MonoBehaviour: eventHandler: {fileID: 0} commandList: - {fileID: 53095175} - - {fileID: 53095179} - {fileID: 53095174} - {fileID: 53095173} - {fileID: 53095172} @@ -1131,26 +1128,6 @@ MonoBehaviour: stringVal: startIndex: 0 callMode: 0 ---- !u!114 &53095179 -MonoBehaviour: - m_ObjectHideFlags: 2 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 53095135} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b521257e66940a4c835dce2e246e464, type: 3} - m_Name: - m_EditorClassIdentifier: - itemId: 34 - indentLevel: 0 - property: 9 - transformData: - transformRef: {fileID: 0} - transformVal: {fileID: 785288107} - vec3: - vector3Ref: {fileID: 0} - vector3Val: {x: 1, y: 1, z: 1} --- !u!114 &53095180 MonoBehaviour: m_ObjectHideFlags: 2 @@ -1172,7 +1149,7 @@ MonoBehaviour: inOutVar: {fileID: 53095160} --- !u!114 &53095181 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 53095135} @@ -1191,7 +1168,7 @@ MonoBehaviour: inOutVar: {fileID: 53095158} --- !u!114 &53095182 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 53095135} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index 0a69793b..88af1c0c 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -14,7 +14,39 @@ InputManager: altNegativeButton: a altPositiveButton: d gravity: 3 - dead: .00100000005 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: p1xAxis + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: + altPositiveButton: + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: p2xAxis + descriptiveName: + descriptiveNegativeName: + negativeButton: a + positiveButton: d + altNegativeButton: + altPositiveButton: + gravity: 3 + dead: 0.001 sensitivity: 3 snap: 1 invert: 0 @@ -30,7 +62,39 @@ InputManager: altNegativeButton: s altPositiveButton: w gravity: 3 - dead: .00100000005 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: p1yAxis + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: + altPositiveButton: + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: p2yAxis + descriptiveName: + descriptiveNegativeName: + negativeButton: s + positiveButton: w + altNegativeButton: + altPositiveButton: + gravity: 3 + dead: 0.001 sensitivity: 3 snap: 1 invert: 0 @@ -46,7 +110,7 @@ InputManager: altNegativeButton: altPositiveButton: mouse 0 gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -62,7 +126,7 @@ InputManager: altNegativeButton: altPositiveButton: mouse 1 gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -78,7 +142,7 @@ InputManager: altNegativeButton: altPositiveButton: mouse 2 gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -94,7 +158,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -111,7 +175,7 @@ InputManager: altPositiveButton: gravity: 0 dead: 0 - sensitivity: .100000001 + sensitivity: 0.1 snap: 0 invert: 0 type: 1 @@ -127,7 +191,7 @@ InputManager: altPositiveButton: gravity: 0 dead: 0 - sensitivity: .100000001 + sensitivity: 0.1 snap: 0 invert: 0 type: 1 @@ -143,7 +207,7 @@ InputManager: altPositiveButton: gravity: 0 dead: 0 - sensitivity: .100000001 + sensitivity: 0.1 snap: 0 invert: 0 type: 1 @@ -158,7 +222,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: .189999998 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -174,7 +238,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: .189999998 + dead: 0.19 sensitivity: 1 snap: 0 invert: 1 @@ -190,7 +254,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -206,7 +270,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -222,7 +286,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -238,7 +302,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -254,7 +318,7 @@ InputManager: altNegativeButton: altPositiveButton: joystick button 0 gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -270,7 +334,7 @@ InputManager: altNegativeButton: altPositiveButton: space gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 @@ -286,7 +350,7 @@ InputManager: altNegativeButton: altPositiveButton: joystick button 1 gravity: 1000 - dead: .00100000005 + dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 From ad1731edbd782b638ceb16452ee02de653db40b5 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Sat, 7 Oct 2017 11:42:38 +1000 Subject: [PATCH 4/6] Reorg files for PlaygroundDemo --- .../Playground/{Defender.meta => Prefabs.meta} | 4 ++-- .../{Football => Prefabs}/Bouncy.physicsMaterial2D | 0 .../Bouncy.physicsMaterial2D.meta | 0 .../Playground/{Defender => Prefabs}/Cannon.prefab | 0 .../{Defender => Prefabs}/Cannon.prefab.meta | 0 .../Playground/{Defender => Prefabs}/Enemy.prefab | 0 .../{Defender => Prefabs}/Enemy.prefab.meta | 0 .../{Defender => Prefabs}/EnemyDieParticle.prefab | 0 .../EnemyDieParticle.prefab.meta | 0 .../Playground/{Defender => Prefabs}/Laser.prefab | 0 .../{Defender => Prefabs}/Laser.prefab.meta | 0 .../{Football => Prefabs}/LeftGoal.prefab | 0 .../{Football => Prefabs}/LeftGoal.prefab.meta | 0 .../Playground/{Football => Prefabs}/P1.prefab | 0 .../Playground/{Football => Prefabs}/P1.prefab.meta | 0 .../Playground/{Defender => Prefabs}/Spawner.prefab | 0 .../{Defender => Prefabs}/Spawner.prefab.meta | 0 .../Playground/{Football.meta => Sprites.meta} | 4 ++-- .../Playground/{Defender => Sprites}/Circle.png | Bin .../{Defender => Sprites}/Circle.png.meta | 0 .../Playground/{Defender => Sprites}/Hexagon.png | Bin .../{Defender => Sprites}/Hexagon.png.meta | 0 .../Playground/{Defender => Sprites}/Square.png | Bin .../{Defender => Sprites}/Square.png.meta | 0 .../Playground/{Defender => Sprites}/Triangle.png | Bin .../{Defender => Sprites}/Triangle.png.meta | 0 26 files changed, 4 insertions(+), 4 deletions(-) rename Assets/FungusExamples/Playground/{Defender.meta => Prefabs.meta} (67%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/Bouncy.physicsMaterial2D (100%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/Bouncy.physicsMaterial2D.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Cannon.prefab (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Cannon.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Enemy.prefab (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Enemy.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/EnemyDieParticle.prefab (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/EnemyDieParticle.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Laser.prefab (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Laser.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/LeftGoal.prefab (100%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/LeftGoal.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/P1.prefab (100%) rename Assets/FungusExamples/Playground/{Football => Prefabs}/P1.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Spawner.prefab (100%) rename Assets/FungusExamples/Playground/{Defender => Prefabs}/Spawner.prefab.meta (100%) rename Assets/FungusExamples/Playground/{Football.meta => Sprites.meta} (67%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Circle.png (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Circle.png.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Hexagon.png (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Hexagon.png.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Square.png (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Square.png.meta (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Triangle.png (100%) rename Assets/FungusExamples/Playground/{Defender => Sprites}/Triangle.png.meta (100%) diff --git a/Assets/FungusExamples/Playground/Defender.meta b/Assets/FungusExamples/Playground/Prefabs.meta similarity index 67% rename from Assets/FungusExamples/Playground/Defender.meta rename to Assets/FungusExamples/Playground/Prefabs.meta index 24dfc125..bfad4aa4 100644 --- a/Assets/FungusExamples/Playground/Defender.meta +++ b/Assets/FungusExamples/Playground/Prefabs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d53118d44e845714086fd3c871a9b755 +guid: 53a333df914f1ba42ad369c1f1ba3f03 folderAsset: yes -timeCreated: 1503314586 +timeCreated: 1507340427 licenseType: Free DefaultImporter: userData: diff --git a/Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D b/Assets/FungusExamples/Playground/Prefabs/Bouncy.physicsMaterial2D similarity index 100% rename from Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D rename to Assets/FungusExamples/Playground/Prefabs/Bouncy.physicsMaterial2D diff --git a/Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D.meta b/Assets/FungusExamples/Playground/Prefabs/Bouncy.physicsMaterial2D.meta similarity index 100% rename from Assets/FungusExamples/Playground/Football/Bouncy.physicsMaterial2D.meta rename to Assets/FungusExamples/Playground/Prefabs/Bouncy.physicsMaterial2D.meta diff --git a/Assets/FungusExamples/Playground/Defender/Cannon.prefab b/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Cannon.prefab rename to Assets/FungusExamples/Playground/Prefabs/Cannon.prefab diff --git a/Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Cannon.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/Cannon.prefab.meta diff --git a/Assets/FungusExamples/Playground/Defender/Enemy.prefab b/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Enemy.prefab rename to Assets/FungusExamples/Playground/Prefabs/Enemy.prefab diff --git a/Assets/FungusExamples/Playground/Defender/Enemy.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Enemy.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/Enemy.prefab.meta diff --git a/Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab b/Assets/FungusExamples/Playground/Prefabs/EnemyDieParticle.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab rename to Assets/FungusExamples/Playground/Prefabs/EnemyDieParticle.prefab diff --git a/Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/EnemyDieParticle.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/EnemyDieParticle.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/EnemyDieParticle.prefab.meta diff --git a/Assets/FungusExamples/Playground/Defender/Laser.prefab b/Assets/FungusExamples/Playground/Prefabs/Laser.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Laser.prefab rename to Assets/FungusExamples/Playground/Prefabs/Laser.prefab diff --git a/Assets/FungusExamples/Playground/Defender/Laser.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/Laser.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Laser.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/Laser.prefab.meta diff --git a/Assets/FungusExamples/Playground/Football/LeftGoal.prefab b/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Football/LeftGoal.prefab rename to Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab diff --git a/Assets/FungusExamples/Playground/Football/LeftGoal.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Football/LeftGoal.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab.meta diff --git a/Assets/FungusExamples/Playground/Football/P1.prefab b/Assets/FungusExamples/Playground/Prefabs/P1.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Football/P1.prefab rename to Assets/FungusExamples/Playground/Prefabs/P1.prefab diff --git a/Assets/FungusExamples/Playground/Football/P1.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/P1.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Football/P1.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/P1.prefab.meta diff --git a/Assets/FungusExamples/Playground/Defender/Spawner.prefab b/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Spawner.prefab rename to Assets/FungusExamples/Playground/Prefabs/Spawner.prefab diff --git a/Assets/FungusExamples/Playground/Defender/Spawner.prefab.meta b/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Spawner.prefab.meta rename to Assets/FungusExamples/Playground/Prefabs/Spawner.prefab.meta diff --git a/Assets/FungusExamples/Playground/Football.meta b/Assets/FungusExamples/Playground/Sprites.meta similarity index 67% rename from Assets/FungusExamples/Playground/Football.meta rename to Assets/FungusExamples/Playground/Sprites.meta index 5aa41074..df5c303a 100644 --- a/Assets/FungusExamples/Playground/Football.meta +++ b/Assets/FungusExamples/Playground/Sprites.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f9222b9f301ecfe4aac15b4c817a7609 +guid: 66234cc023a5a9940af9854f34567bf1 folderAsset: yes -timeCreated: 1504215334 +timeCreated: 1507340446 licenseType: Free DefaultImporter: userData: diff --git a/Assets/FungusExamples/Playground/Defender/Circle.png b/Assets/FungusExamples/Playground/Sprites/Circle.png similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Circle.png rename to Assets/FungusExamples/Playground/Sprites/Circle.png diff --git a/Assets/FungusExamples/Playground/Defender/Circle.png.meta b/Assets/FungusExamples/Playground/Sprites/Circle.png.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Circle.png.meta rename to Assets/FungusExamples/Playground/Sprites/Circle.png.meta diff --git a/Assets/FungusExamples/Playground/Defender/Hexagon.png b/Assets/FungusExamples/Playground/Sprites/Hexagon.png similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Hexagon.png rename to Assets/FungusExamples/Playground/Sprites/Hexagon.png diff --git a/Assets/FungusExamples/Playground/Defender/Hexagon.png.meta b/Assets/FungusExamples/Playground/Sprites/Hexagon.png.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Hexagon.png.meta rename to Assets/FungusExamples/Playground/Sprites/Hexagon.png.meta diff --git a/Assets/FungusExamples/Playground/Defender/Square.png b/Assets/FungusExamples/Playground/Sprites/Square.png similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Square.png rename to Assets/FungusExamples/Playground/Sprites/Square.png diff --git a/Assets/FungusExamples/Playground/Defender/Square.png.meta b/Assets/FungusExamples/Playground/Sprites/Square.png.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Square.png.meta rename to Assets/FungusExamples/Playground/Sprites/Square.png.meta diff --git a/Assets/FungusExamples/Playground/Defender/Triangle.png b/Assets/FungusExamples/Playground/Sprites/Triangle.png similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Triangle.png rename to Assets/FungusExamples/Playground/Sprites/Triangle.png diff --git a/Assets/FungusExamples/Playground/Defender/Triangle.png.meta b/Assets/FungusExamples/Playground/Sprites/Triangle.png.meta similarity index 100% rename from Assets/FungusExamples/Playground/Defender/Triangle.png.meta rename to Assets/FungusExamples/Playground/Sprites/Triangle.png.meta From cc56a1cd5f2f82ee94c51172f1b2f4b115e2c330 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Sun, 8 Oct 2017 21:22:08 +1000 Subject: [PATCH 5/6] Renamed folders within PlaygroundDemo Fixed missing components in PlaygroundDemo scenes and prefabs Formatting fixed for added scripts Added HasReference override to all commands --- Assets/Fungus/Scripts/Commands/Destroy.cs | 8 ++ .../Fungus/Scripts/Commands/Input/GetAxis.cs | 14 ++- .../Commands/Rigidbody2D/AddForce2D.cs | 9 ++ .../Commands/Rigidbody2D/AddTorque2D.cs | 9 +- .../Rigidbody2D/StopMotionRigidBody2D.cs | 10 +- Assets/Fungus/Scripts/Commands/SpawnObject.cs | 10 ++ .../Commands/Transform/TransformProperty.cs | 16 ++- .../Commands/Vector3/Vector3Arithmetic.cs | 10 +- .../Scripts/Commands/Vector3/Vector3Fields.cs | 11 +- .../Commands/Vector3/Vector3Normalise.cs | 7 ++ .../Commands/Vector3/Vector3ToVector2.cs | 12 +- Assets/FungusExamples/Playground/Lander.unity | 2 +- .../Playground/Prefabs/Cannon.prefab | 106 ++++++------------ .../Playground/Prefabs/Enemy.prefab | 12 +- .../Playground/Prefabs/Laser.prefab | 32 +++--- .../Playground/Prefabs/LeftGoal.prefab | 14 +-- .../Playground/Prefabs/P1.prefab | 42 +++---- .../Playground/Prefabs/Spawner.prefab | 63 ++++------- 18 files changed, 210 insertions(+), 177 deletions(-) diff --git a/Assets/Fungus/Scripts/Commands/Destroy.cs b/Assets/Fungus/Scripts/Commands/Destroy.cs index f380c9db..8288d4b3 100644 --- a/Assets/Fungus/Scripts/Commands/Destroy.cs +++ b/Assets/Fungus/Scripts/Commands/Destroy.cs @@ -53,6 +53,14 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (_targetGameObject.gameObjectRef == variable || destroyInXSeconds.floatRef == variable) + return true; + + return false; + } + #endregion #region Backwards compatibility diff --git a/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs index 652763e4..644ecbb2 100644 --- a/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs +++ b/Assets/Fungus/Scripts/Commands/Input/GetAxis.cs @@ -15,7 +15,7 @@ namespace Fungus { [SerializeField] protected StringData axisName; - + [Tooltip("If true, calls GetAxisRaw instead of GetAxis")] [SerializeField] protected bool axisRaw = false; @@ -26,7 +26,7 @@ namespace Fungus public override void OnEnter() { - if(axisRaw) + if (axisRaw) { outValue.Value = Input.GetAxisRaw(axisName.Value); } @@ -34,7 +34,7 @@ namespace Fungus { outValue.Value = Input.GetAxis(axisName.Value); } - + Continue(); } @@ -48,5 +48,13 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (axisName.stringRef == variable || outValue.floatRef == variable) + return true; + + return false; + } + } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs index 345d5985..bedb42a4 100644 --- a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddForce2D.cs @@ -72,5 +72,14 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (rb.rigidbody2DRef == variable || force.vector2Ref == variable || forceScaleFactor.floatRef == variable || + atPosition.vector2Ref == variable) + return true; + + return false; + } + } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs index e84b3441..59c2b3a3 100644 --- a/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/AddTorque2D.cs @@ -32,7 +32,7 @@ namespace Fungus public override string GetSummary() { - if(rb.Value == null) + if (rb.Value == null) { return "Error: rb not set"; } @@ -44,6 +44,13 @@ namespace Fungus { return new Color32(235, 191, 217, 255); } + + public override bool HasReference(Variable variable) + { + if (rb.rigidbody2DRef == variable || force.floatRef == variable) + return true; + return false; + } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs index aafe1c8d..ef4c0e31 100644 --- a/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs +++ b/Assets/Fungus/Scripts/Commands/Rigidbody2D/StopMotionRigidBody2D.cs @@ -15,7 +15,7 @@ namespace Fungus { [SerializeField] protected Rigidbody2DData rb; - + public enum Motion { Velocity, @@ -57,5 +57,13 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (rb.rigidbody2DRef == variable) + return true; + + return false; + } + } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/SpawnObject.cs b/Assets/Fungus/Scripts/Commands/SpawnObject.cs index 0cd17fbc..34954d52 100644 --- a/Assets/Fungus/Scripts/Commands/SpawnObject.cs +++ b/Assets/Fungus/Scripts/Commands/SpawnObject.cs @@ -92,6 +92,16 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (_sourceObject.gameObjectRef == variable || _parentTransform.transformRef == variable || + _spawnAtSelf.booleanRef == variable || _spawnPosition.vector3Ref == variable || + _spawnRotation.vector3Ref == variable) + return true; + + return false; + } + #endregion #region Backwards compatibility diff --git a/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs index 31fe8cab..32c2850c 100644 --- a/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs +++ b/Assets/Fungus/Scripts/Commands/Transform/TransformProperty.cs @@ -48,7 +48,7 @@ namespace Fungus [SerializeField] protected TransformData transformData; - + [SerializeField] [VariableProperty(typeof(BooleanVariable), typeof(IntegerVariable), @@ -174,13 +174,13 @@ namespace Fungus default: break; } - + Continue(); } public override string GetSummary() { - if(transformData.Value == null) + if (transformData.Value == null) { return "Error: no transform set"; } @@ -190,7 +190,7 @@ namespace Fungus var iov = inOutVar as Vector3Variable; var iot = inOutVar as TransformVariable; - if(iob == null && ioi == null && iov == null && iot == null) + if (iob == null && ioi == null && iov == null && iot == null) { return "Error: no variable set to push or pull data to or from"; } @@ -205,5 +205,13 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (transformData.transformRef == variable || inOutVar == variable) + return true; + + return false; + } + } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs index 0ed0bd28..fe53a530 100644 --- a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Arithmetic.cs @@ -58,7 +58,7 @@ namespace Fungus public override string GetSummary() { - if(output.vector3Ref == null) + if (output.vector3Ref == null) { return "Error: no output set"; } @@ -70,5 +70,13 @@ namespace Fungus { return new Color32(235, 191, 217, 255); } + + public override bool HasReference(Variable variable) + { + if (lhs.vector3Ref == variable || rhs.vector3Ref == variable || output.vector3Ref == variable) + return true; + + return false; + } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs index 427ae24f..baafe67f 100644 --- a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Fields.cs @@ -22,7 +22,7 @@ namespace Fungus [SerializeField] protected Vector3Data vec3; - + [SerializeField] protected FloatData x, y, z; @@ -50,7 +50,7 @@ namespace Fungus public override string GetSummary() { - if(vec3.vector3Ref == null) + if (vec3.vector3Ref == null) { return "Error: vec3 not set"; } @@ -63,5 +63,12 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (vec3.vector3Ref == variable || x.floatRef == variable || y.floatRef == variable || z.floatRef == variable) + return true; + + return false; + } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs index a02164b4..f4323e49 100644 --- a/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3Normalise.cs @@ -36,5 +36,12 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + public override bool HasReference(Variable variable) + { + if (vec3In.vector3Ref == variable || vec3Out.vector3Ref == variable) + return true; + + return false; + } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs index d7709ca9..9f08b761 100644 --- a/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs +++ b/Assets/Fungus/Scripts/Commands/Vector3/Vector3ToVector2.cs @@ -29,8 +29,10 @@ namespace Fungus public override string GetSummary() { - if(vec3.vector3Ref != null && vec2.vector2Ref != null) + if (vec3.vector3Ref != null && vec2.vector2Ref != null) + { return "Converting " + vec3.vector3Ref.Key + " to " + vec2.vector2Ref.Key; + } return "Error: variables not set"; } @@ -40,5 +42,13 @@ namespace Fungus return new Color32(235, 191, 217, 255); } + + public override bool HasReference(Variable variable) + { + if (variable == vec3.vector3Ref || variable == vec2.vector2Ref) + return true; + + return false; + } } } \ No newline at end of file diff --git a/Assets/FungusExamples/Playground/Lander.unity b/Assets/FungusExamples/Playground/Lander.unity index cbc4213a..c729ea04 100644 --- a/Assets/FungusExamples/Playground/Lander.unity +++ b/Assets/FungusExamples/Playground/Lander.unity @@ -2021,7 +2021,7 @@ MonoBehaviour: scrollPos: {x: 146, y: -26.5} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 - blockViewHeight: 324 + blockViewHeight: 401 zoom: 1 scrollViewRect: serializedVersion: 2 diff --git a/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab b/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab index 8e077ab9..e74f2f67 100644 --- a/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/Cannon.prefab @@ -45,8 +45,6 @@ GameObject: - component: {fileID: 114873397630457622} - component: {fileID: 114099386588132780} - component: {fileID: 114238188189624062} - - component: {fileID: 114797075761082608} - - component: {fileID: 114611752584720384} m_Layer: 0 m_Name: Cannon m_TagString: Untagged @@ -72,7 +70,7 @@ GameObject: m_IsActive: 1 --- !u!4 &4038790522185248 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -100,7 +98,7 @@ Transform: --- !u!50 &50078523555390844 Rigidbody2D: serializedVersion: 4 - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -119,7 +117,7 @@ Rigidbody2D: m_Constraints: 3 --- !u!114 &114036837631678186 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -133,7 +131,7 @@ MonoBehaviour: keyCode: 32 --- !u!114 &114093757454897032 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -160,7 +158,7 @@ MonoBehaviour: stringVal: --- !u!114 &114099386588132780 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -187,7 +185,7 @@ MonoBehaviour: stringVal: --- !u!114 &114110427670967256 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -207,7 +205,7 @@ MonoBehaviour: floatVal: 0 --- !u!114 &114116014992790474 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -251,7 +249,7 @@ MonoBehaviour: luaBindingName: flowchart --- !u!114 &114141913385670956 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -278,7 +276,7 @@ MonoBehaviour: stringVal: --- !u!114 &114194947709156218 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -291,7 +289,7 @@ MonoBehaviour: FireOn: 2 --- !u!114 &114238188189624062 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -318,7 +316,7 @@ MonoBehaviour: stringVal: --- !u!114 &114268424750904310 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -332,7 +330,7 @@ MonoBehaviour: value: 1 --- !u!114 &114310288066248142 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -346,7 +344,7 @@ MonoBehaviour: value: {x: 0, y: 0, z: 0} --- !u!114 &114476154734915750 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -360,7 +358,7 @@ MonoBehaviour: value: {x: 0, y: 0, z: 0} --- !u!114 &114499702294427518 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -374,7 +372,7 @@ MonoBehaviour: value: 1 --- !u!114 &114567745504451066 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -403,7 +401,7 @@ MonoBehaviour: - {fileID: 114588250137994584} --- !u!114 &114588250137994584 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -421,29 +419,9 @@ MonoBehaviour: force: floatRef: {fileID: 114680196880106302} floatVal: 5 ---- !u!114 &114611752584720384 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1380797001910276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b521257e66940a4c835dce2e246e464, type: 3} - m_Name: - m_EditorClassIdentifier: - itemId: 14 - indentLevel: 1 - property: 11 - transformData: - transformRef: {fileID: 0} - transformVal: {fileID: 4244392958347542} - vec3: - vector3Ref: {fileID: 114476154734915750} - vector3Val: {x: 0, y: 0, z: 0} --- !u!114 &114680196880106302 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -457,7 +435,7 @@ MonoBehaviour: value: 0 --- !u!114 &114704119826569804 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -469,29 +447,9 @@ MonoBehaviour: scope: 0 key: spawnAtTrans value: {fileID: 4244392958347542} ---- !u!114 &114797075761082608 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1380797001910276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b521257e66940a4c835dce2e246e464, type: 3} - m_Name: - m_EditorClassIdentifier: - itemId: 13 - indentLevel: 1 - property: 0 - transformData: - transformRef: {fileID: 0} - transformVal: {fileID: 4038790522185248} - vec3: - vector3Ref: {fileID: 114310288066248142} - vector3Val: {x: 0, y: 0, z: 0} --- !u!114 &114873397630457622 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -518,7 +476,7 @@ MonoBehaviour: stringVal: --- !u!114 &114904554220365688 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -531,7 +489,7 @@ MonoBehaviour: indentLevel: 0 --- !u!114 &114920461919457924 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -549,19 +507,25 @@ MonoBehaviour: _parentTransform: transformRef: {fileID: 0} transformVal: {fileID: 0} + _spawnAtSelf: + booleanRef: {fileID: 0} + booleanVal: 0 _spawnPosition: vector3Ref: {fileID: 114476154734915750} vector3Val: {x: 0, y: 0, z: 0} _spawnRotation: vector3Ref: {fileID: 114310288066248142} vector3Val: {x: 0, y: 0, z: 0} + _newlySpawnedObject: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} sourceObjectOLD: {fileID: 0} parentTransformOLD: {fileID: 0} spawnPositionOLD: {x: 0, y: 0, z: 0} spawnRotationOLD: {x: 0, y: 0, z: 0} --- !u!114 &114945764084547224 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -588,7 +552,7 @@ MonoBehaviour: stringVal: --- !u!114 &114948797197275504 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -605,7 +569,7 @@ MonoBehaviour: durationOLD: 0 --- !u!114 &114980758164341790 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -629,15 +593,15 @@ MonoBehaviour: commandList: - {fileID: 114945764084547224} - {fileID: 114141913385670956} - - {fileID: 114797075761082608} - - {fileID: 114611752584720384} + - {fileID: 0} + - {fileID: 0} - {fileID: 114920461919457924} - {fileID: 114948797197275504} - {fileID: 114093757454897032} - {fileID: 114904554220365688} --- !u!114 &114987963891140428 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -651,7 +615,7 @@ MonoBehaviour: value: 6 --- !u!114 &114994441961358866 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} @@ -665,7 +629,7 @@ MonoBehaviour: value: 0 --- !u!212 &212653995144694442 SpriteRenderer: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1380797001910276} diff --git a/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab b/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab index f14f3cef..8f178d65 100644 --- a/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/Enemy.prefab @@ -49,7 +49,7 @@ GameObject: m_IsActive: 1 --- !u!4 &4729075542556854 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} @@ -63,7 +63,7 @@ Transform: --- !u!50 &50984474618864754 Rigidbody2D: serializedVersion: 4 - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} @@ -82,7 +82,7 @@ Rigidbody2D: m_Constraints: 0 --- !u!61 &61443573752364678 BoxCollider2D: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} @@ -238,7 +238,7 @@ MonoBehaviour: targetGameObjectOLD: {fileID: 0} --- !u!114 &114478123438267686 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} @@ -293,7 +293,7 @@ MonoBehaviour: spawnRotationOLD: {x: 0, y: 0, z: 0} --- !u!114 &114619489782507194 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} @@ -500,7 +500,7 @@ MonoBehaviour: - {fileID: 114643528736330088} --- !u!212 &212968368228859608 SpriteRenderer: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1292638556747252} diff --git a/Assets/FungusExamples/Playground/Prefabs/Laser.prefab b/Assets/FungusExamples/Playground/Prefabs/Laser.prefab index 33cc2829..a1f2615e 100644 --- a/Assets/FungusExamples/Playground/Prefabs/Laser.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/Laser.prefab @@ -72,7 +72,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4591436351563906 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -87,7 +87,7 @@ Transform: --- !u!50 &50266752063846120 Rigidbody2D: serializedVersion: 4 - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -106,7 +106,7 @@ Rigidbody2D: m_Constraints: 0 --- !u!60 &60745726664901920 PolygonCollider2D: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -276,7 +276,7 @@ TrailRenderer: --- !u!96 &96390674517467256 TrailRenderer: serializedVersion: 2 - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -366,7 +366,7 @@ TrailRenderer: m_Autodestruct: 0 --- !u!114 &114182131449558960 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -391,7 +391,7 @@ MonoBehaviour: - {fileID: 114299940920854140} --- !u!114 &114216864803211772 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -405,7 +405,7 @@ MonoBehaviour: value: {fileID: 50266752063846120} --- !u!114 &114250531415154764 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -420,7 +420,7 @@ MonoBehaviour: FireOn: 1 --- !u!114 &114299940920854140 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -438,7 +438,7 @@ MonoBehaviour: messageOLD: --- !u!114 &114455382144078078 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -452,7 +452,7 @@ MonoBehaviour: value: 3 --- !u!114 &114487163524766562 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -479,7 +479,7 @@ MonoBehaviour: vector2Val: {x: 0, y: 0} --- !u!114 &114526636883379746 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -518,7 +518,7 @@ MonoBehaviour: luaBindingName: flowchart --- !u!114 &114593477394275294 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -544,7 +544,7 @@ MonoBehaviour: - {fileID: 114751314740007556} --- !u!114 &114602407226986924 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -557,7 +557,7 @@ MonoBehaviour: waitForFrames: 1 --- !u!114 &114751314740007556 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -577,7 +577,7 @@ MonoBehaviour: targetGameObjectOLD: {fileID: 0} --- !u!114 &114979932131573080 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} @@ -591,7 +591,7 @@ MonoBehaviour: value: {x: 0, y: 10} --- !u!212 &212200396344711462 SpriteRenderer: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1942691996823588} diff --git a/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab b/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab index fc718bec..acff678c 100644 --- a/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/LeftGoal.prefab @@ -34,7 +34,7 @@ GameObject: m_IsActive: 1 --- !u!4 &4678101578738422 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -47,7 +47,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!61 &61864220351951950 BoxCollider2D: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -72,7 +72,7 @@ BoxCollider2D: m_EdgeRadius: 0 --- !u!114 &114034257819947328 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -90,7 +90,7 @@ MonoBehaviour: messageOLD: --- !u!114 &114505441869896354 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -105,7 +105,7 @@ MonoBehaviour: FireOn: 1 --- !u!114 &114534288108544306 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -130,7 +130,7 @@ MonoBehaviour: - {fileID: 114034257819947328} --- !u!114 &114600625297110402 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} @@ -166,7 +166,7 @@ MonoBehaviour: luaBindingName: flowchart --- !u!212 &212708722285412346 SpriteRenderer: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1846694562102150} diff --git a/Assets/FungusExamples/Playground/Prefabs/P1.prefab b/Assets/FungusExamples/Playground/Prefabs/P1.prefab index a663e9aa..40076df4 100644 --- a/Assets/FungusExamples/Playground/Prefabs/P1.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/P1.prefab @@ -48,7 +48,7 @@ GameObject: m_IsActive: 1 --- !u!4 &4164059856041556 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -62,7 +62,7 @@ Transform: --- !u!50 &50485926042586766 Rigidbody2D: serializedVersion: 4 - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -81,7 +81,7 @@ Rigidbody2D: m_Constraints: 4 --- !u!58 &58545323045532278 CircleCollider2D: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -96,7 +96,7 @@ CircleCollider2D: m_Radius: 0.5 --- !u!114 &114024079056778752 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -110,7 +110,7 @@ MonoBehaviour: value: 0 --- !u!114 &114081283549603066 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -133,7 +133,7 @@ MonoBehaviour: operation: 2 --- !u!114 &114085027684436294 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -159,7 +159,7 @@ MonoBehaviour: floatVal: 0 --- !u!114 &114126325013622294 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -202,7 +202,7 @@ MonoBehaviour: luaBindingName: flowchart --- !u!114 &114177047531498962 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -234,7 +234,7 @@ MonoBehaviour: - {fileID: 114334667391765546} --- !u!114 &114188004173552184 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -248,7 +248,7 @@ MonoBehaviour: value: 0 --- !u!114 &114201986544531680 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -261,7 +261,7 @@ MonoBehaviour: FireOn: 2 --- !u!114 &114314477038342724 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -281,7 +281,7 @@ MonoBehaviour: floatVal: 0 --- !u!114 &114326212544484044 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -295,7 +295,7 @@ MonoBehaviour: value: {x: 0, y: 0, z: 0} --- !u!114 &114334667391765546 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -322,7 +322,7 @@ MonoBehaviour: vector2Val: {x: 0, y: 0} --- !u!114 &114337264207455518 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -342,7 +342,7 @@ MonoBehaviour: floatVal: 0 --- !u!114 &114348338108346498 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -356,7 +356,7 @@ MonoBehaviour: value: {x: 0, y: 0} --- !u!114 &114409838832793244 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -375,7 +375,7 @@ MonoBehaviour: vector3Val: {x: 0, y: 0, z: 0} --- !u!114 &114465925968467040 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -394,7 +394,7 @@ MonoBehaviour: vector2Val: {x: 0, y: 0} --- !u!114 &114573728990135962 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -408,7 +408,7 @@ MonoBehaviour: value: 60 --- !u!114 &114777688141419168 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -422,7 +422,7 @@ MonoBehaviour: value: {x: 0, y: 0, z: 0} --- !u!114 &114862459103620794 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} @@ -448,7 +448,7 @@ MonoBehaviour: floatVal: 0 --- !u!212 &212462972284088668 SpriteRenderer: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1404956649453682} diff --git a/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab b/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab index 7e6b5000..7827414b 100644 --- a/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab +++ b/Assets/FungusExamples/Playground/Prefabs/Spawner.prefab @@ -31,7 +31,6 @@ GameObject: - component: {fileID: 114205508981943572} - component: {fileID: 114451434740700826} - component: {fileID: 114158483713016934} - - component: {fileID: 114170397803954806} - component: {fileID: 114708947738974764} - component: {fileID: 114536672983551206} m_Layer: 0 @@ -43,7 +42,7 @@ GameObject: m_IsActive: 1 --- !u!4 &4839343606506310 Transform: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -56,7 +55,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &114094183539183980 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -98,7 +97,7 @@ MonoBehaviour: luaBindingName: flowchart --- !u!114 &114158188752211888 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -124,13 +123,12 @@ MonoBehaviour: - {fileID: 114222629582179790} - {fileID: 114186534075702092} - {fileID: 114845356377412462} - - {fileID: 114170397803954806} - {fileID: 114536672983551206} - {fileID: 114533871774847328} - {fileID: 114197543733484370} --- !u!114 &114158483713016934 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -142,34 +140,9 @@ MonoBehaviour: scope: 0 key: spawnPos value: {x: 0, y: 0, z: 0} ---- !u!114 &114170397803954806 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1643320542487702} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1119697fcc02a1c45936fd8c00b481d7, type: 3} - m_Name: - m_EditorClassIdentifier: - itemId: 7 - indentLevel: 0 - xval: - floatRef: {fileID: 114205508981943572} - floatVal: 0 - yval: - floatRef: {fileID: 114451434740700826} - floatVal: 0 - zval: - floatRef: {fileID: 0} - floatVal: 0 - vec3: - vector3Ref: {fileID: 114158483713016934} - vector3Val: {x: 0, y: 0, z: 0} --- !u!114 &114186534075702092 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -189,7 +162,7 @@ MonoBehaviour: floatVal: 6 --- !u!114 &114197543733484370 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -206,7 +179,7 @@ MonoBehaviour: targetLabelOLD: {fileID: 0} --- !u!114 &114205508981943572 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -220,7 +193,7 @@ MonoBehaviour: value: 0 --- !u!114 &114220456410977536 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -234,7 +207,7 @@ MonoBehaviour: key: start --- !u!114 &114222629582179790 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -251,7 +224,7 @@ MonoBehaviour: durationOLD: 0 --- !u!114 &114271269415529472 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -264,7 +237,7 @@ MonoBehaviour: waitForFrames: 1 --- !u!114 &114451434740700826 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -278,7 +251,7 @@ MonoBehaviour: value: 0 --- !u!114 &114533871774847328 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -296,19 +269,25 @@ MonoBehaviour: _parentTransform: transformRef: {fileID: 0} transformVal: {fileID: 0} + _spawnAtSelf: + booleanRef: {fileID: 0} + booleanVal: 0 _spawnPosition: vector3Ref: {fileID: 114158483713016934} vector3Val: {x: 0, y: 0, z: 0} _spawnRotation: vector3Ref: {fileID: 0} vector3Val: {x: 0, y: 0, z: 0} + _newlySpawnedObject: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} sourceObjectOLD: {fileID: 0} parentTransformOLD: {fileID: 0} spawnPositionOLD: {x: 0, y: 0, z: 0} spawnRotationOLD: {x: 0, y: 0, z: 0} --- !u!114 &114536672983551206 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -331,7 +310,7 @@ MonoBehaviour: operation: 0 --- !u!114 &114708947738974764 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} @@ -345,7 +324,7 @@ MonoBehaviour: value: {x: 0, y: 6, z: 0} --- !u!114 &114845356377412462 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1643320542487702} From 2cdc6e59bbdbc06e45f38587c750992b1fc6c695 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Sat, 28 Oct 2017 21:46:42 +1000 Subject: [PATCH 6/6] Added a ReadMe to the Playground Folder explaining its purpose and some of its structure --- Assets/FungusExamples/Playground/ReadMe.md | 45 +++++++++++++++++++ .../FungusExamples/Playground/ReadMe.md.meta | 8 ++++ 2 files changed, 53 insertions(+) create mode 100644 Assets/FungusExamples/Playground/ReadMe.md create mode 100644 Assets/FungusExamples/Playground/ReadMe.md.meta diff --git a/Assets/FungusExamples/Playground/ReadMe.md b/Assets/FungusExamples/Playground/ReadMe.md new file mode 100644 index 00000000..7e1fb285 --- /dev/null +++ b/Assets/FungusExamples/Playground/ReadMe.md @@ -0,0 +1,45 @@ +Playground +========== +Playground is a set of scenes that approximate some of the demos from https://github.com/UnityTechnologies/PlaygroundProject . They are simple sets of game like behaviour. They are not intended stand alone released or to played as games, they serve as demonstrations of how to configure and use physics driven behaviour in Unity3d with Fungus. It uses multiple flowcharts in one scene controlling individual objects, game resources, game rules and GUI. + + +Common Structure +=============== +All scenes make use of RigibBody2D, Collisions and Triggers. There is a FungusVariable to hold RigibBody2D references. Triggers and Collisions are EventHandlers, under the MonoBehaviour Event category. They also make use of other, MonoBehaviour EventHandlers and the newer Transform and Vector3 related Commands. + +Movement and rotation are done via AddForce2D and AddTorque2D Commands based on input from the user. The drag factors on the RigibBody2D have been dialed in to give the desired feel. + +Game interactions use SendMessage command to communicate specific interactions to the **GameRules** Flowchart. These messages are caught in its EventHandlers to alter score, lives, and the like. The GameRules also updates the UI as needed. + + +Defender +======== +### Overview +Player rotates the turret in the centre with Left & Right arrow keys. Press space to launch a mushroom. Hit the falling squares before they reach the ground to win. If too many falling squares make it to the ground, it's game over. + +### Elements +**Spawner** creates a random position within some defined limits at a specified interval and then uses the SpawnObject command. + +**Cannon** has a block that uses an Input Axis as the input value to a AddTorque2D. Another block executes on KeyPress, it fetches the position and rotation of the cannon, spawns a prefab and gives it the fetched position and rotation. It also toggles a bool to prevent it from running faster than a defined fire rate. + +**Ground** simply sends a message when an object tagged as Enemy Enters its trigger. This allows the **GameRules** to update lives remaining. This GameObject has a Box2D trigger on it. + +**Enemy** is the prefab created by the Spawner, it has a RigibBody2D, a Box2D collider. Its flowchart spins itself and destroys itself when it Trigger Enters a Laser or the Ground. + +Football +======== +### Overview +A 1v1 football / air hockey setup. 1 player uses W,A,S,D to move, the other, the arrow keys. Get the red ball through your opponents goal to score a point. + +### Elements +**Goal** Simply a Box2D Trigger that does a SendMessage command when the ball enters. + +**P** Gathers input via GetAxis command, combines and scales them into a vector to be passed into an AddForce2D. + +Lander +====== +### Overview +Up arrow boosts the small yellow rocket mushroom. Left & Right arrow keys rotate it. The goal is to get the yellow rocket mushroom to the other white platform in the upper right, without going out of bounds or hitting the other parts of the environment. + +### Elements +**Lander** has a RigibBody2D, it applies force and torque in an update event. It saves a position and rotation on game start so it can reset itself. It then has Collision Checks based on tag, one for death, one for success. Objects in the world are then named. diff --git a/Assets/FungusExamples/Playground/ReadMe.md.meta b/Assets/FungusExamples/Playground/ReadMe.md.meta new file mode 100644 index 00000000..fabd807e --- /dev/null +++ b/Assets/FungusExamples/Playground/ReadMe.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4517a8d50b89a3a489de5b82bf4b8152 +timeCreated: 1509191147 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: