public ShieldCommand(BaseCharacter actor, float castTime, float blockAmount) { this.actor = (PlayerModel)actor; this.castTime = castTime; this.blockAmount = blockAmount; this.iconPath = "ui/icons/shieldSymbol"; }
public AttackCommand(BaseCharacter actor, BaseCharacter target, float castTime, float damage) { this.actor = actor; this.target = target; this.castTime = castTime; this.damage = damage; this.iconPath = "ui/icons/swordSymbol"; }
public void init(PlayerModel player, BaseCharacter enemy) { Vector3 pos = new Vector3(-282, -342, 0); AbilityCommand tmpCommand; for (int i = 0; i < player.inventory.Count; i++) { if (player.inventory[i].equipped) { tmpCommand = player.inventory[i].getCommand(player, enemy); addAbilityBtn(tmpCommand, pos, player.inventory[i].iconPath); pos.x += 200; } } }
public override AbilityCommand getCommand(BaseCharacter actor, BaseCharacter target) { return new AttackCommand(actor, target, castTime, damage); }
public abstract AbilityCommand getCommand(BaseCharacter actor, BaseCharacter target);