public virtual bool PerformAbility(CharacterPowerIdentity abilityId, Character character) { if (character == null) { return(false); } CharacterPower abilityToPerform = CharacterPower.Get(abilityId); if (abilityToPerform == null) { return(false); } return(this.PerformAbility(abilityToPerform, character)); }
public void Update(GameTime gameTime, WorldState world) { foreach (CharacterPowerIdentity powerID in this.Powers) { var power = CharacterPower.Get(powerID); power.Update(gameTime, world, this); } this.Stats.Update(gameTime); this.Stats.Modifiers.Update(gameTime, this); if (this.BusyDuration > 0) { this.BusyDuration -= gameTime.ElapsedGameTime.TotalMilliseconds; } if (this.IsMoving) { this.UpdateMapPosition(gameTime); } }