diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2021-05-24 21:58:21 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2021-05-24 21:58:21 -0400 |
| commit | 41885dd0301b47137f0b4f6a6a3e2a3354a0563e (patch) | |
| tree | 8b1f4a141e2d57c990b0bfc380ec66293ff486d3 /Assets/Scripts | |
| parent | 618d3ba27ac276b53a5a32dc51cfc1c313686902 (diff) | |
| download | prototype-a-41885dd0301b47137f0b4f6a6a3e2a3354a0563e.tar.gz prototype-a-41885dd0301b47137f0b4f6a6a3e2a3354a0563e.tar.bz2 prototype-a-41885dd0301b47137f0b4f6a6a3e2a3354a0563e.zip | |
Updated Readme, Selection and Scene
Diffstat (limited to 'Assets/Scripts')
| -rw-r--r-- | Assets/Scripts/Selector.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Assets/Scripts/Selector.cs b/Assets/Scripts/Selector.cs index e59d3ea..9d2b3c6 100644 --- a/Assets/Scripts/Selector.cs +++ b/Assets/Scripts/Selector.cs @@ -5,8 +5,10 @@ using UnityEngine; public class Selector : MonoBehaviour { public GameObject physGun; + public GameObject cineCamera; private bool oneSelected = false; + private bool twoSelected = false; // Update is called once per frame void Update() { @@ -25,5 +27,24 @@ public class Selector : MonoBehaviour Debug.Log("PhysGun deselected"); } } + if (Input.GetKeyDown(KeyCode.Alpha2)) + { + if (twoSelected == false) + { + physGun.SetActive(true); + twoSelected = true; + if (oneSelected == true) + { + oneSelected = false; + } + Debug.Log("PhysGun selected"); + } + else + { + physGun.SetActive(false); + twoSelected = false; + Debug.Log("PhysGun deselected"); + } + } } } |
