summaryrefslogtreecommitdiff
path: root/Assets/Scripts/BossCameraScript.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/BossCameraScript.cs')
-rwxr-xr-xAssets/Scripts/BossCameraScript.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/Assets/Scripts/BossCameraScript.cs b/Assets/Scripts/BossCameraScript.cs
new file mode 100755
index 0000000..c257982
--- /dev/null
+++ b/Assets/Scripts/BossCameraScript.cs
@@ -0,0 +1,31 @@
+using UnityEngine;
+using System.Collections;
+
+public class BossCameraScript : MonoBehaviour {
+
+ public GameObject Camera;
+ bool BossCamEnabled;
+
+ // Use this for initialization
+ void Start () {
+
+ }
+
+ // Update is called once per frame
+ void FixedUpdate () {
+ if (BossCamEnabled)
+ Camera.transform.position = new Vector3(Mathf.Lerp(Camera.transform.position.x,135.5f,.2f), 10.8f,-10);
+ }
+
+ public void EnableBossCamera()
+ {
+ Camera.GetComponent<CameraScript>().enabled = false;
+ BossCamEnabled = true;
+ }
+
+ public void DisableBossCamera()
+ {
+ BossCamEnabled = false;
+ Camera.GetComponent<CameraScript>().enabled = true;
+ }
+}