public Entity(Area l, ISaveLoad saveLoad) { SaveLoad = saveLoad; Location = l; CurObjective = new objectives.Idle(this); CurAction = CurObjective.GetAction(); }
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); }
public void DoTick() { if( CurObjective.Complete) CurObjective = new objectives.Idle(this); if (CurAction.Complete) CurAction = CurObjective.GetAction(); CurAction.DoTick(); }
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(); }