Beispiel #1
0
    void DestroyUfo()
    {
        //내 비행기 폭파 여부 검사하여 폭파하지 않았으면 점수 계산.
        if (GameObject.Find("Flight") == null || addScore == 0)
        {
            return;
        }
        addedScore = GameObject.Find("GameManager").GetComponent <ComboSystemScript>().isComboOnlyScore(addScore);

        AddScore(addedScore);                                                            //스코어 추가.
        addScoreLabelUiObjectPool.AddScoreActivation(this.gameObject, addedScore, true); //폭파시 화면에 추가점수 표시해줌.

        coinTime = Time.timeSinceLevelLoad;
        if (!wingboxout)
        {
            ItemBoxBirth();              //아이템 발생.
        }
        megaCoin = true;
        instanceMissionScript.NewMission();
    }
Beispiel #2
0
    void GetItem()
    {
        switch (gameObject.tag)
        {
        case "Coin":
            if (!pcFlight)
            {
                return;
            }
            if (ValueDeliverScript.flightNumber == 1)
            {
                ValueDeliverScript.flight001GetCoinTemp += addCoin;
            }
            if (PC.particleSystem)
            {
                PC.particleSystem.Play();
            }
            else
            {
                PC.transform.parent.gameObject.particleSystem.Play();
            }
            soundUiControlScript.CoinGet();         //동전획득음 재생.
            ValueDeliverScript.coinPlay += addCoin; //획득한 코인점수 더함.
            scoreCoinCount.CoinCount();             //점수판에 코인점수 표시.
            instanceMissionScript.AddCoin(addCoin);

            gameObject.SetActive(false);
            break;


        case "Item01":
            if (ValueDeliverScript.flightNumber == 1)
            {
                ValueDeliverScript.flight001GetPowerItemTemp++;
            }

            //Debug.Log("현재 전투기 상태 ::: " + col.gameObject.tag);
            if (ValueDeliverScript.isBombRechargeDecrease)
            {
                Debug.Log("실행하냐? isBombRechargeDecrease ::: " + ValueDeliverScript.isBombRechargeDecrease);
                bombSkillGageScript.AddBombGage();
            }

            int addedGageForNumber = bulletControlScript.addedGageForNumber;
            //초과획득시 추가 점수 제공.
            if (addedGageForNumber >= 16)
            {
                ValueDeliverScript.scorePlay     += overItemBonusScore;                                  //추가 점수 스코어에 더함. 기본 5000점으로 초기화되어있음.
                ValueDeliverScript.portalUpScore += overItemBonusScore;                                  //포털레벨업을 위한 목표점수에 이 점수 역시 추가.
                scoreCoinCount.ScoreCount();                                                             //점수판에 획득 점수 표시.
                addScoreLabeluiObjectPool.AddScoreActivation(this.gameObject, overItemBonusScore, true); //화면에 폭파된 적기 위에 점수 표시해주는 이펙트.
                instanceMissionScript.AddScore(overItemBonusScore);

                GameObject.Find("GameManager").GetComponent <FriendRescueScript>().MinusScore(ValueDeliverScript.scorePlay, transform.position, false); //좌측 친구 이미지에서 점수를 조금씩 빼게 만들어준다.
                bulletControlScript.AddBulletLevel(powerUpBulletAddGage);                                                                               // 불릿레벨 증가.
            }
            else
            {
                //Debug.Log("불릿레벨증가함?");
                bulletControlScript.AddBulletLevel(powerUpBulletAddGage); // 불릿레벨 증가.
            }
            soundUiControlScript.ItemGet();                               //아이템획득음 재생.
            //Debug.Log("Get Power Up Item ! ");
            instanceMissionScript.AddPowerUp();

            gameObject.SetActive(false);
            break;



        case "Item02":
            //스킬게이지약간 추가
            soundUiControlScript.GetEnergy();               //아이템획득음 재생.
            bombSkillGageScript.AddSkillGageValue(addGage); // 스킬레벨 증가.
            instanceMissionScript.AddSkillUp();             //스킬 아이템을 몇개 먹었는지 체크.

            skillButton.animation.Play("ButtonScaleActionAnim01");

            gameObject.SetActive(false);
            break;

        case "Item03":
            //스킬맥스
            soundUiControlScript.WingboxItemGet();          //아이템획득음 재생.
            bombSkillGageScript.AddSkillGageValue(addGage); // 스킬게이지 모두 회복.
            characterSpeakManager.CharacterMessageShow(0);

            skillButton.animation.Play("ButtonScaleActionAnim01");

            gameObject.SetActive(false);
            break;


        case "Item04":
            //밤리로더.
            soundUiControlScript.WingboxItemGet();      //아이템획득음 재생.
            bombButton01UIFilledSprite.fillAmount = 1;  //핵폭탄게이지 모두 차고 시간 초기화.
            characterSpeakManager.CharacterMessageShow(1);

            bombButton.animation.Play("ButtonScaleActionAnim01");

            gameObject.SetActive(false);
            break;

        case "Item05":
            //마그넷코어.
            addedChSpeakScript.ChSpeak(0);

            Debug.Log("magnet Core!!!");
            soundUiControlScript.WingboxItemGet();      //아이템획득음 재생.
            magnetScript.Activate(mRadius, mTime);      //마그넷 기능 활성화.
            //runeObj.SetActive(true);	//비행기 주변 룬기능 활성화.
            //runeAlphaAni.Activate(mTime);
            characterSpeakManager.CharacterMessageShow(2);

            gameObject.SetActive(false);
            break;

        case "Item07":
            //푸엘 노멀.
            addedChSpeakScript.ChSpeak(0);

            Debug.Log("Fuel Normal!!!");
            soundUiControlScript.WingboxItemGet();      //아이템획득음 재생.
            //아이템 획득시 기능 설정//
            GameObject.Find("FuelSlider").GetComponent <FuelSliderScript>().AddFuel(addGage);
            //아이템 획득시 기능 설정//
            characterSpeakManager.CharacterMessageShow(2);
            fuelImageTF.animation.Play("ButtonScaleActionAnim02");
            instanceMissionScript.addFuelItem();         //연료 아이템을 몇개 먹었는지 체크.

            gameObject.SetActive(false);
            break;

        case "Item08":
            //푸엘 맥스.
            addedChSpeakScript.ChSpeak(0);

            Debug.Log("Fuel Max!!!");
            soundUiControlScript.WingboxItemGet();      //아이템획득음 재생.
            //아이템 획득시 기능 설정//
            GameObject.Find("FuelSlider").GetComponent <FuelSliderScript>().AddFuel(addGage);

            //GameObject.Find("FuelSlider").GetComponent<FuelSliderScript>().FullFuel();
            //아이템 획득시 기능 설정//
            characterSpeakManager.CharacterMessageShow(2);
            fuelImageTF.animation.Play("ButtonScaleActionAnim02");

            gameObject.SetActive(false);
            break;
        }
    }
    void DestroyUfo(string nameTag = "None")
    {
        if (ValueDeliverScript.flightNumber == 1)
        {
            ValueDeliverScript.flight001EnemyKillTemp++;
        }
        else if (ValueDeliverScript.flightNumber == 2 && ufoType == 1)
        {
            ValueDeliverScript.flight002KillSpinballTemp++;
        }

        if (!isLevelChangeBomb01)
        {                                         // 레벨체인지밤으로 처리시 점수나 아이템 방출은 처리안함.//동전 생성. -파워업은 PortalActivation에서 처리함.
            portalActivation.AddEnumyKillCount(); //.AddEnumyKillCount(); //킬 되고 나서 킬수 더해줌.
            //						Debug.Log (parentPortal.name + "AddEnumyKillCount");

            int addedScore;
            addedScore = GameObject.Find("GameManager").GetComponent <ComboSystemScript>().isCombo(this.addScore);

            AddScore(addedScore);       //스코어 추가.

            AddSkillGage(addSkillGage); //스킬 게이지 추가.
            AddUfoCount();
            ValueDeliverScript.skinExp += skinExp;

            ////////////포털에서 나온 유에프오의 파괴와 소멸을 계산하여 점수화 하는 부분.-시작.
            //이프 조건 시작.
            if (portalActivation.enemyBirthCount == portalActivation.enemyMaxCount
                &&
                (portalActivation.enumyKilledCount + portalActivation.enumyDeathCount) >= portalActivation.enemyMaxCount)
            //여기까지 이프조건 내용.
            {
                if (portalActivation.enumyDeathCount == 0 && portalActivation.ufoOn == true)
                {
                    int perfectKillBonusScoreAdd = 0;
                    perfectKillBonusScoreAdd = (int)(perfectKillBonusScore * (1 + ValueDeliverScript.scoreIncreasePercent));
                    perfectKillBonusScoreAdd = GameObject.Find("GameManager").GetComponent <ComboSystemScript>().isComboOnlyScore(perfectKillBonusScoreAdd);
                    AddScore(perfectKillBonusScoreAdd);

                    if (ufoType == 3)
                    {
                        addScoreLabelUiObjectPool.AddScoreActivation(transform.GetChild(0).gameObject, perfectKillBonusScoreAdd, true);
                    }
                    else
                    {
                        addScoreLabelUiObjectPool.AddScoreActivation(this.gameObject, perfectKillBonusScoreAdd, true);
                    }
                    ItemBoxBirth();
                }

                if (portalActivation.gameObject.activeSelf == true)
                {
                    portalActivation.ufoOn = false;
                    portalActivation.IsDeactivate();
                }
            }
            ////////////포털에서 나온 유에프오의 파괴와 소멸을 계산하여 점수화 하는 부분.-끝.

            CoinMaker();
            if (ufoType == 3)
            {
                addScoreLabelUiObjectPool.AddScoreActivation(transform.GetChild(0).gameObject, addedScore, false);
            }
            else
            {
                addScoreLabelUiObjectPool.AddScoreActivation(this.gameObject, addedScore, false);  // 추가하여야 될 점수 표시판에 넣어줌.
            }
        }
        ExploEnd();
    }