예제 #1
0
 // プレイヤーからの攻撃判定メゾット
 void OnTriggerEnter2D(Collider2D collider2D)
 {
     if (transform.position.x > -8.5f)
     {
         if (collider2D.gameObject.tag == "EnemyD")
         {
             HP -= characs.DamageProcess(gameObject, characs.playerAttack, characs.StDefense, 0);
             characs.PA_SE();
         }
         if (collider2D.gameObject.tag == "EnemyD_fromLaser")
         {
             HP -= characs.DamageProcess(gameObject, characs.playerAttack, characs.StDefense, 2);
         }
         if (collider2D.gameObject.tag == "EnemyD_fromhaitu")
         {
             HP -= characs.DamageProcess(gameObject, characs.playerAttack, characs.StDefense, 3);
         }
     }
 }