public void ApplySkillShotAttack(EnemyBaseScript enemy)
 {
     if (player.IsSkillShotActive)
     {
         //SkillShot Damage = Skill Shot Skill Multiplier x Player Attack Damage
         enemy.ApplyDamage(player.Skills.GetPlayerSkillShotDamage() * player.Skills.GetPlayerDamage());
         enemy.AddKnockback(enemy.transform.position - player.transform.position, Force);
         UnityEngine.Debug.LogWarning("Skill Shot Damage: " + (player.Skills.GetPlayerSkillShotDamage() * player.Skills.GetPlayerDamage()));
     }
 }
示例#2
0
    public override void Progress()
    {
//적 생성
        EnemyBaseScript enemy = GameObject.Instantiate(Test.instance.enemyBase,
                                                       (Vector3)marker.path.startPoint.point + pos, Quaternion.identity).GetComponent <EnemyBaseScript>();

        enemy.Init(Test.instance.enemy.data[enemyCode].patternRate, marker.path.speed, marker.path.constantSpeed, pos, Test.instance.enemy.data[enemyCode].sprite,
                   Test.instance.enemy.data[enemyCode].bullet, marker.path, Test.instance.enemy.data[enemyCode].shotPoint.ToArray());
        enemy.gameObject.transform.SetParent(Test.instance.inGameObjects);
        Test.instance.enemyCount++;
    }
示例#3
0
 void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.CompareTag("Enemy"))
     {
         EnemyBaseScript enemy = collision.gameObject.GetComponent <EnemyBaseScript> ();
         if (enemy != null)
         {
             enemy.damageHealth(baseDamage);
         }
     }
     Detonate();
 }
示例#4
0
 public void ActivateTrap(EnemyBaseScript enemy)
 {
     //if the trap is active
     if (IsActive)
     {
         //apply the damage to the enemy
         if (!enemy.IsSpawned)
         {
             if (enemy.isBoss)
                 enemy.ApplyDamage(0.01f * enemy.MaxHealth * Time.deltaTime);
             else
                 enemy.ApplyDamage(0.1f * enemy.MaxHealth * Time.deltaTime);
         }
     }
 }