Ejemplo n.º 1
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;
        }
    }
Ejemplo n.º 2
0
 void AddSkillGage(int addSkillGage)
 {
     addSkillGage += ValueDeliverScript.rechargeEnergy;
     bombSkillGageScript.AddSkillGageValue(addSkillGage);
 }