// Start is called before the first frame update void Start() { timesUpText.SetActive(false); TimeBar = GetComponent <Image>(); Timeleft = MaxTime; state = GetComponent <foodState>(); }
public void ChangeState(foodState newState) { currentState.gameObject.SetActive(false); newState.gameObject.SetActive(true); currentState = newState; }