blob: c25798212fe653b3eab0b137197ff6a5042f5fd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}
}
|