Пример #1
0
 public Entity(Area l, ISaveLoad saveLoad)
 {
     SaveLoad = saveLoad;
     Location = l;
     CurObjective = new objectives.Idle(this);
     CurAction = CurObjective.GetAction();
 }
Пример #2
0
 public Entity(Area l, ILogger logger, ISaveLoad saveLoad, int id)
 {
     ID = id;
     _logger = logger;
     SaveLoad = saveLoad;
     Location = l;
     CurObjective = new objectives.Idle(this);
     CurAction = CurObjective.GetAction();
     _char = new Character(saveLoad, logger, "Ted", 20, 200, 20, 20, 20, this.ID);
 }
Пример #3
0
        public void DoTick()
        {
            if( CurObjective.Complete)
                CurObjective = new objectives.Idle(this);

            if (CurAction.Complete)
                CurAction = CurObjective.GetAction();

            CurAction.DoTick();
        }
Пример #4
0
        public void DoTick()
        {
            if (_char.IsInCombat)
                return;
            if (!_char.isAlive())
            {
                _char.CurHp = _char.Hp;
                _logger.Log(new StatusMessage(_char));
                _logger.Log("Ted died and had to be revived. Poor Ted.");
                return;
            }
            if( CurObjective.Complete)
                CurObjective = new objectives.Idle(this);

            if (CurAction.Complete)
                CurAction = CurObjective.GetAction();

            CurAction.DoTick();
        }