void DoUpdate() { UpdateFear(); if (CurBotStatus != null) { CurBotStatus.Update(); } //Teste Raum verlassen //if (Input.GetKeyDown(KeyCode.Space)) //{ // SetBotStatus<RunRandomlyStatus>(); //} }
public void AddStatus(BaseStatus newStatus) { BaseStatus oldStatus = SearchStatusLike(newStatus.GetType()); if (oldStatus == null) { _statuses.Add(newStatus); } else { oldStatus.Update(newStatus); newStatus.DestroyStatusExecute(); } UpdateUI(); }