diff options
author | nirav <nirav@airmail.cc> | 2020-12-12 07:18:36 +0000 |
---|---|---|
committer | nirav <nirav@airmail.cc> | 2020-12-12 07:18:36 +0000 |
commit | 115f77bda0246a00f6e17469685c67746bdbd29d (patch) | |
tree | 4bbea1e59109bb1d1fddc71736f89289bab03073 /Assets/Scripts/BossCameraScript.cs | |
download | 01-master.tar.gz 01-master.zip |
Diffstat (limited to 'Assets/Scripts/BossCameraScript.cs')
-rwxr-xr-x | Assets/Scripts/BossCameraScript.cs | 31 |
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; + } +} |