public void Restart() { player.GetComponent <Animator>().Play("New State"); PF.StopPatrol(); gameState = true; score = 0; player.transform.position = new Vector3(0, 0, 0); allProp[PlayerArea].GetComponent <Prop>().follow_player = true; CCManager.Tracert(allProp[PlayerArea], player); foreach (GameObject x in allProp.Values) { if (!x.GetComponent <Prop>().follow_player) { CCManager.GoAround(x); } } }
public void Restart() { player.GetComponent <Animator>().Play("Idle"); patrolFactory.StopPatrols(); gameState = true; score = 0; player.transform.position = new Vector3(0, 0, -2); player.transform.localEulerAngles = Vector3.zero; PlayerArea = 4; patrols[PlayerArea].GetComponent <Patrol>().follow_player = true; actionManager.CatchUp(patrols[PlayerArea], player); actionManager.StopAll(); foreach (GameObject action in patrols.Values) { if (!action.GetComponent <Patrol>().follow_player) { actionManager.GoAround(action); } } }