Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (60 sloc) 1.46 KB
Room1 - x15 y39 z-4
Room2 - x15 y39 z5
Room3 (right) - x30 y39 z5
Room4 (left) - x-1 y39 z5
Room 5 (final) - x15 y39 z16
using UnityEngine;
using System.Collections;
public class CameraControlls : MonoBehaviour
{
GameObject cameraSet;
public Camera camera0;
public Camera camera1;
public Camera camera2;
public Camera camera3;
public Camera camera4;
//Camera States
int room = 0;
// Use this for initialization
void Start()
{
camera0.enabled = false;
camera1.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
room = 0;
//cameraPos.TransformPoint(new Vector3(15, 39, -4));
}
// Update is called once per frame
void Update()
{
//Room 0, Entrance
if (room == 0)
{
camera1.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
camera0.enabled = true;
}
if (Input.GetKeyDown(KeyCode.W))
{
room = 1;
}
//Room 1, Middle
if (room == 1)
{
camera0.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
camera1.enabled = true;
}
if (Input.GetKeyDown(KeyCode.W))
{
//if ()
room = 1;
}
}
}
You can’t perform that action at this time.