Beispiel #1
0
    void Counter()
    {
        //プレイヤーに若干のダメージを与える
        int damage = MobBase.calcDamage(minAtk, maxAtk);

        hpapi.Damage(damage);
    }
Beispiel #2
0
 //範囲内に何かが入ると動く
 private void OnTriggerEnter(Collider other)
 {
     //プレイヤータグの場合はダメージを与えて判定を消す
     if (other.tag == "Player")
     {
         int damage = MobBase.calcDamage((int)(boss.minAtk * 1.2), (int)(boss.maxAtk * 1.2));
         hpapi.Damage(damage);
         transform.root.gameObject.GetComponent <BoxCollider>().enabled = false;
     }
 }
Beispiel #3
0
    IEnumerator Attack()
    {
        int damage = MobBase.calcDamage(minAtk, maxAtk);

        hpapi.Damage(damage);

        yield return(new WaitForSeconds(this.damageSpan));

        this.isAttacking = false;
    }
Beispiel #4
0
 //範囲内に何かが入ると動く
 private void OnTriggerEnter(Collider other)
 {
     //プレイヤータグの場合はダメージを与えて消す
     if (other.tag == "Player")
     {
         int damage = MobBase.calcDamage(minAtk, maxAtk);
         hpapi.Damage(damage);
         Destroy(wepon);
     }
 }
Beispiel #5
0
 //範囲内に何かが入ると動く
 private void OnTriggerEnter(Collider other)
 {
     //プレイヤータグの場合はダメージを与えて消す
     if (other.tag == "Player")
     {
         int damage = MobBase.calcDamage(minAtk, maxAtk);
         hpapi.Damage(damage);
         this.transform.parent = null;
         Destroy(this.transform.root.gameObject);
         boss.CoolOn();
     }
 }
Beispiel #6
0
    //アニメーションイベントで使用する
    void Attack1()
    {
        int damage = MobBase.calcDamage(minAtk, maxAtk);

        hpapi.Damage(damage);
    }