void Awake() { switchingit = false; states.Add(new KeyValuePair <gamestate, gamestate>(gamestate.init, gamestate.p1active)); states.Add(new KeyValuePair <gamestate, gamestate>(gamestate.p1active, gamestate.switching)); states.Add(new KeyValuePair <gamestate, gamestate>(gamestate.switching, gamestate.p1active)); states.Add(new KeyValuePair <gamestate, gamestate>(gamestate.p2active, gamestate.switching)); states.Add(new KeyValuePair <gamestate, gamestate>(gamestate.switching, gamestate.p2active)); cam = FindObjectOfType <CameraManagers>(); }
void Init() { cam = FindObjectOfType <CameraManagers>(); player1 = GameObject.Find("BluePlayer").GetComponent <Player>(); player2 = GameObject.Find("RedPlayer").GetComponent <Player>(); }