Example #1
0
    void DoUpdate()
    {
        UpdateFear();

        if (CurBotStatus != null)
        {
            CurBotStatus.Update();
        }

        //Teste Raum verlassen
        //if (Input.GetKeyDown(KeyCode.Space))
        //{
        //    SetBotStatus<RunRandomlyStatus>();
        //}
    }
Example #2
0
    public void AddStatus(BaseStatus newStatus)
    {
        BaseStatus oldStatus = SearchStatusLike(newStatus.GetType());

        if (oldStatus == null)
        {
            _statuses.Add(newStatus);
        }
        else
        {
            oldStatus.Update(newStatus);
            newStatus.DestroyStatusExecute();
        }
        UpdateUI();
    }