public override void DoAction(PlayerCharacter character, Selectable select)
 {
     if (select.GetDestructible())
     {
         character.Attack(select.GetDestructible());
     }
 }
    private void OnClickObject(Selectable selectable)
    {
        selectable.Select();

        //Attack target ?
        Destructible target = selectable.GetDestructible();

        if (target != null && target.attack_by_default && CanAttack(target))
        {
            Attack(target);
        }
        else
        {
            InteractWith(selectable);
        }
    }
Exemple #3
0
 public override void DoAction(PlayerCharacter character, Selectable select)
 {
     select.GetDestructible().KillIn(0.5f);
     character.TriggerAnim(animation, select.transform.position);
 }
Exemple #4
0
 public override bool CanDoAction(PlayerCharacter character, Selectable select)
 {
     return(select.GetDestructible() && !select.GetDestructible().IsDead());
 }