Ejemplo n.º 1
0
        void AddWave()
        {
            MainSoundSrc.PlaySound("airplane");
            airplane.GetComponent <Animator>().Play("AirplaneFly", -1, 0f);
            bird.GetComponent <Animator>().Play("bird_airplane", -1, 0f);
            timer = Game3_LvlingStat.GetLvling().airplaneDelayed;
            GameObject    gobj = new GameObject("Wave");
            ParashootWave wave = gobj.AddComponent <ParashootWave>();

            wave.SetupWave(gameplayItem);
        }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (pGlobal.gController.state == GameState.GS_PLAY)
     {
         timer -= Time.deltaTime;
         //popup airplane and delayed
         if (timer <= 0)
         {
             timer += Game3_LvlingStat.GetLvling().airplaneDelayed;
             AddWave();
         }
     }
 }
Ejemplo n.º 3
0
 void Awake()
 {
     lvling    = Game3_LvlingStat.GetLvling();
     IsPerfect = true;
 }
Ejemplo n.º 4
0
        // Update is called once per frame
        void Update()
        {
            Vector2 pos         = TouchInterface.GetTouchPosition();
            bool    isTouchDown = TouchInterface.GetTouchDown();
            bool    isTouchUp   = TouchInterface.GetTouchUp();

            if (isTouchDown && GetComponent <Collider2D>().OverlapPoint(pos))
            {
                if (Game3Global.pGlobal.dragObject == null)
                {
                    Game3Global.pGlobal.dragObject = this;
                    IsTouch = true;
                }
            }
            if (isTouchUp && Game3Global.pGlobal.dragObject == this)
            {
                //calculate score
                if (Game3Global.pGlobal.boxObject != null)
                {
                    if (Game3Global.pGlobal.boxObject.type == this.type)
                    {
                        //correct
                        MainSoundSrc.PlaySound("right");
                        Game3Global.BirdOK();
                        Game3Global.AddScore(300);
                        Game3Global.AddCombo();
                        Game3_LvlingStat.AddEXP();
                        parentWave.ParashootClear();
                        Destroy(this.gameObject);
                    }
                    else
                    {
                        MainSoundSrc.PlaySound("wrong");
                        Game3Global.BirdWrong();
                        Game3Global.BrokeCombo();
                        Game3Global.DecreaseLife();
                        parentWave.ParashootClear(false);
                        Destroy(this.gameObject);
                    }
                }
                Game3Global.pGlobal.dragObject = null;
                IsTouch = false;
            }
            if (IsTouch)
            {
                touchPos = pos;
            }
            else
            {
                if (IsEnterTrash)
                {
                    if (type != ParashootType.PARA_OTHER)
                    {
                        MainSoundSrc.PlaySound("wrong");
                        Game3Global.BirdWrong();
                        Game3Global.BrokeCombo();
                        Game3Global.DecreaseLife();
                        parentWave.ParashootClear(false);
                    }
                    else
                    {
                        MainSoundSrc.PlaySound("bin");
                        parentWave.ParashootClear();
                    }
                    Game3Global.TrashEnter();
                    Destroy(this.gameObject);
                }
            }
            UpdatePosition();
        }
Ejemplo n.º 5
0
 // Use this for initialization
 void Awake()
 {
     GameLvlingObject = this;
     ResetGame();
 }
Ejemplo n.º 6
0
 void GameStart()
 {
     Game3_LvlingStat.ResetGame(gController.mainMenu.Item4.IsSelect);
     gameplayItem = new GameObject("GameItem");
     gameplayItem.transform.position = spawnPoint.transform.position;
 }