aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/Selector.cs21
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");
+ }
+ }
}
}