예제 #1
0
 public void BlackHollIn()
 {
     soundUiControlScript.UfoAttacked();
     ufoLife = 0;
     if (ufoType != 3)
     {
         activate.ExploActivation(transform.position + addPosition, 02, gameObject.name); //피탄 이펙트 켜짐.
     }
     DestroyUfo("BlackHall");
 }
예제 #2
0
    void OnTriggerEnter(Collider col)
    {
        if (isOnTrigger && col.gameObject.tag == "Bullet")
        {
            int bulletDamage = (int)(col.gameObject.GetComponent <BulletInfoScript>().bulletDamageF *(1 + ValueDeliverScript.flightAttackPower));
            soundUiControlScript.WormholeAttacked();                                                //피탄 사운드 켜짐.
            activate.ExploActivation(transform.position + new Vector3(0, 0, -0.3f), 02, "WingBox"); //피탄 이펙트 켜짐.
            col.gameObject.SetActive(false);

            addDemage += bulletDamage;
        }

        if (col.gameObject.tag == "Bomb01") // 포털레벨체인지 폭탄 피격 계산.
        {
            soundUiControlScript.UfoAttacked();
            activate.ExploActivation(transform.position + addPosition, 02, "WingBox"); //피탄 이펙트 켜짐.
            Deactivate2();
        }
    }
예제 #3
0
    void OnTriggerEnter(Collider col)
    {
        int bulletDamage;

        if (wingboxLife <= 0)
        {
            return;
        }

        switch (col.tag)
        {
        case "Missile":
        case "Bullet":
            //총알 피격 계산.
            soundUiControlScript.UfoAttacked();
            bulletDamage = (int)(col.gameObject.GetComponent <BulletInfoScript>().bulletDamageF *ValueDeliverScript.skin02_03Effect);
            wingboxLife -= (int)(bulletDamage * (ValueDeliverScript.flightAttackPower + 1));
            activate.ExploActivation(transform.position + addPosition, 02, "GoldenWH"); //피탄 이펙트 켜짐.

            activate.CoinActivation(transform.position, 1);                             //3은 코인레벨. 격추시 3개짜리 동전만 출현해줌.

            col.gameObject.SetActive(false);                                            // 총알 끔.

            //if (!isAttackMove)
            isAttacked = true;
            break;

        //case "Missile":
        //    //총알 피격 계산.
        //    soundUiControlScript.UfoAttacked();
        //    bulletDamage = (int)(col.gameObject.GetComponent<BulletInfoScript>().bulletDamageF * ValueDeliverScript.skin02_03Effect);
        //    wingboxLife -= (int)(bulletDamage * ValueDeliverScript.flightAttackPower);
        //    activate.ExploActivation(transform.position, 05, "WingBox"); //폭발이펙트 켜짐.
        //    activate.CoinActivation(transform.position, 1);	//3은 코인레벨. 격추시 3개짜리 동전만 출현해줌.
        //    col.gameObject.SetActive(false);
        //    break;

        case "SuperPower":
        case "PcLaser":
        case "Bomb01":
        case "Bomb03":
            // 핵폭탄 피격 계산.
            soundUiControlScript.UfoAttacked();
            wingboxLife = -1;
            activate.ExploActivation(transform.position + addPosition, 02, "WingBox");     //피탄 이펙트 켜짐.

            //if (!isAttackMove)
            isAttacked = true;
            break;

        case "SkillBullet":      //실제 스킬샷 타격 계산// 현재는 스킬포탄의 태크는 이것으로 밖에 안쓰임//

            soundUiControlScript.UfoAttacked();
            int skillBDamage = col.gameObject.GetComponent <BulletInfoScript>().bulletDamageF;
            wingboxLife -= skillBDamage;
            activate.ExploActivation(transform.position + addPosition, 02, "WingBox");     //피탄 이펙트 켜짐.

            //if (!isAttackMove)
            isAttacked = true;
            break;
        }

        if (wingboxLife <= 0)
        {
            DestroyUfo();
        }
    }