Пример #1
0
    void CheckHP()
    {
        if (HP <= 0)
        {
            HP = 0;
            BoardBraver braver = BoardManager.instance.braver;
            braver.TargetDied();

            Destroy(gameObject);
        }
    }
Пример #2
0
 //MovingObjectの抽象メソッドのため必ず必要
 protected override void OnCantMove <T>(T component)
 {
     if (component.GetComponent <BoardPlayer>())
     {
         BoardPlayer other = component as BoardPlayer;
         other.LoseHP(attackDamage);
         iTween.MoveFrom(gameObject, iTween.Hash("position", other.transform.position, "time", 0.5f));
     }
     else if (component.GetComponent <BoardBraver>())
     {
         BoardBraver other = component as BoardBraver;
         other.LoseHP(attackDamage);
     }
 }
Пример #3
0
 public void AddBraver(BoardBraver script)
 {
     braver = script;
 }