// Update is called once per frame void Update() { if (currentState != targetState) { StopCoroutine(currentState.ToString()); previousState = currentState; currentState = targetState; StartCoroutine(currentState.ToString()); } CreateItem(); ShowPicture(); ChangePlayers(); }
public void SetState(GameModeStates state) { targetState = state; }