Пример #1
0
 public ShieldCommand(BaseCharacter actor, float castTime, float blockAmount)
 {
     this.actor = (PlayerModel)actor;
     this.castTime = castTime;
     this.blockAmount = blockAmount;
     this.iconPath = "ui/icons/shieldSymbol";
 }
Пример #2
0
 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";
 }
Пример #3
0
        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;
                }
            }
        }
Пример #4
0
 public override AbilityCommand getCommand(BaseCharacter actor, BaseCharacter target)
 {
     return new AttackCommand(actor, target, castTime, damage);
 }
Пример #5
0
 public abstract AbilityCommand getCommand(BaseCharacter actor, BaseCharacter target);