Ejemplo n.º 1
0
    void CheckHP()
    {
        if (HP <= 0)
        {
            HP = 0;
            BoardBraver braver = BoardManager.instance.braver;
            braver.TargetDied();

            Destroy(gameObject);
        }
    }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 public void AddBraver(BoardBraver script)
 {
     braver = script;
 }