コード例 #1
0
    IEnumerator ExploEnd()
    {
        soundUiControlScript.UfoExplo();                                                           //폭파음재생.

        activate.ExploActivation(transform.position + new Vector3(0, 0, -5), 01, gameObject.name); //피탄 이펙트 켜짐.
        yield return(new WaitForSeconds(0.2f));

        activate.ExploActivation(transform.position, 01, gameObject.name); //피탄 이펙트 켜짐.
        yield return(new WaitForSeconds(0.2f));

        activate.ExploActivation(transform.position + new Vector3(0, 0, 5), 01, gameObject.name); //피탄 이펙트 켜짐.

        transform.parent.parent.gameObject.SetActive(false);
    }
コード例 #2
0
 // Update is called once per frame
 void ColRad(float rad = 7)
 {
     GetComponent <SphereCollider>().radius = rad;
     ChildObject.SetActive(false);
     activate.ExploActivation(transform.position, 04, fxSize); //폭발이펙트 켜짐.
     StartCoroutine(DeadTime(1f));
 }
コード例 #3
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "Bomb02")
     {
         activate.ExploActivation(transform.position, 04, "Bomb02");           //폭발이펙트 켜짐.
         gameManager.GetComponent <SoundUiControlScript>().UfoExplo();         //폭파음재생.
     }
 }
コード例 #4
0
    void ExploEnd()
    {
        activate.ExploActivation(transform.position, 01, gameObject.name); //피탄 이펙트 켜짐.

        soundUiControlScript.UfoExplo();                                   //폭파음재생.
        isBalckHallActive = false;
        gameObject.SetActive(false);
    }
コード例 #5
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();
        }
    }
コード例 #6
0
    private void ExploEnd()
    {
        if (transform.name == "EnemyLaserBeam")
        {
            activate.ExploActivation(transform.root.FindChild("LaserCannonRot/LaserCannon01").position, 01, gameObject.name); //피탄 이펙트 켜짐.
        }
        else
        {
            activate.ExploActivation(transform.position, 01, gameObject.name); //피탄 이펙트 켜짐.
        }
        soundUiControlScript.UfoExplo();                                       //폭파음재생.

        isBalckHallActive = false;

        if (transform.name == "EnemyLaserBeam")
        {
            transform.root.gameObject.SetActive(false);
        }
        else
        {
            gameObject.SetActive(false);
        }
    }
コード例 #7
0
ファイル: GHoleMove.cs プロジェクト: Dungeonsoft/aerogate_us
    void Update()
    {
        //아직 이펙트가 시작하지 않았으면 아래 내용을 실행하지 않는다.
        if (isFinishFx == false)
        {
            return;
        }
        //블랙홀이 작동을 시작하고 BalckHallActive() 메소드가 시작하지 않으면 이 아래 부분을 실행한다//
        if (BlackHoleBombScript.blackHallOn == true)
        {
            if (isBalckHallActive == false)
            {
                //한번 들어왔은 다시는 이 조건문 안으로 못들어오게 막아준다//
                isBalckHallActive = true;
                //골든웜홀 파괴모드로 들어간다//
                DestroyUfo();
            }
        }
        else if (isAttacked == true && megaCoin == false)
        {
            if (lerpTime < 1f)
            {
                lerpTime += Time.deltaTime * lrMoveSpeed;
                bPos      = Vector3.Slerp(nowPosition, nextPosition, lerpTime);
                //Debug.Log("움직인다!!! ::: 첫 위치 ::: " + nowPosition + " ::: 나중위치 ::: " + nextPosition + " ::: 러프 ::: " + lerpTime);
            }
            else
            {
                bPos = nowPosition = nextPosition;

                NextPosition();
                isAttacked = false;
                lerpTime   = 0;
            }
        }

        if (Mathf.Abs(transform.position.x) > 35)
        { // 지정된 좌우 범위를 넘어서면 사라지게 함.
            instanceMissionScript.NewMission();
            instanceMission.animation.Play("InstanceMissionApearAnim01");
            ValueDeliverScript.enemyInGame.Remove(this.gameObject);
            gameObject.SetActive(false);
        }

        if (megaCoin)
        { //처치시 동전 드랍. 폭발.시작.
            animation.Stop("GoldenWhole01");
            if (coinTime + 0.05f <= Time.timeSinceLevelLoad)
            {
                activate.CoinActivation(transform.position, coinLevel); //3은 코인레벨. 격추시 3개짜리 동전만 출현해줌.
                coinCount++;
                coinTime = Time.timeSinceLevelLoad;
            }

            if (coinCount >= megaCoinCount)
            {
                soundUiControlScript.PcExplo();                              //폭발사운드. 적용.
                activate.ExploActivation(transform.position, 01, "WingBox"); //폭발이펙트 켜짐.
                isFirst = false;

                ValueDeliverScript.enemyInGame.Remove(this.gameObject);
                gameObject.SetActive(false);
            }

            transform.position += new Vector3(Random.Range(-0.3f, 0.3f), Random.Range(-0.3f, 0.3f), Random.Range(-0.3f, 0.3f));
        }

        spendTime += Time.deltaTime;

        //10초가 지나면 골든웜홀을 화면 밖으로 사라지게 해준다.
        if (spendTime > 10f && isOutPosition == false)
        {
            isOutPosition = true;
            OutPosition();
        }
    }
コード例 #8
0
 public void BlackHollIn()
 {
     soundUiControlScript.UfoAttacked();
     ufoLife = 0;
     if (ufoType != 3)
     {
         activate.ExploActivation(transform.position + addPosition, 02, gameObject.name); //피탄 이펙트 켜짐.
     }
     DestroyUfo("BlackHall");
 }