public ActionCharacter(BattleStatus status, GroupId groupId, GroupTag tag, Vector pos, float gravity, float runSpeed, SkillHolder skillHolder, EquipItemHolder equipItemHolder) { CurrentState = new Idle(); Executioner = new Executioner(); CurrentPosition = pos; Gravity = gravity; SkillHolder = skillHolder; PickupItemHolder = new PickupItemHolder(); PickupItemHolder.OnPickedItem += UpdateBattleStatus; PickupItemHolder.OnPickedItem += UpdateRunMaxSpeed; EquipItemHolder = equipItemHolder; BaseStatus = status; BattleCharacter = new BattleCharacter(this, BattleStatusCalculator.calculate(status, this)); BasicRunMaxSpeed = runSpeed; RunMaxSpeed = SpeedCalculator.Calculate(BasicRunMaxSpeed, this); GroupId = groupId; GroupTag = tag; Id = Guid.NewGuid(); IsInvincible = false; CurrentFriction = 0.0f; }
public void UpdateRunMaxSpeed() { RunMaxSpeed = SpeedCalculator.Calculate(BasicRunMaxSpeed, this); }