void OnGetScore()
 {   //按下得分
     ReStartTimer = 0.0f;
     IceAgeButtonControl.Inst.SetMovingButton();
     if (GameStatus == Game_Status.GetJP)
     {   //更新狀態
         GameStatus = Game_Status.GetScore;
         //關閉特效
         IceAgeLineAnimControl.Inst.ReSetLineAnim();
         IceAge_JP_Control.Inst.JPAnim.GetComponent <UISprite>().enabled          = false;
         IceAge_JP_Control.Inst.JPAnim.GetComponent <UISpriteAnimation>().enabled = false;
         //顯示WinMoney & 重設JP顯示
         IceAgeWinMoney.Inst.WinMoney        = (long)IceAgeManager.m_BetResult.m_uiScore;
         IceAgeWinMoney.Inst.StartPlay       = true;
         IceAge_JP_Control.Inst.TargetNumber = 0;
         IceAge_JP_Control.Inst.NowChange    = true;
     }
     else
     {
         if (GameStatus != Game_Status.GetScore && GameStatus != Game_Status.MiniGameSuccess)
         {
             GameStatus = Game_Status.GetScore;
             IceAgeMoneySlot.Inst.TargetNumber = IceAgeManager.m_BetResult.m_ui64GameMoney;
             IceAgeMoneySlot.Inst.NowChange    = true;
         }
         IceAgeLineAnimControl.Inst.ReSetLineAnim();
         IceAgeWinMoney.Inst.m_WinWord.Loop      = false;
         IceAgeWinMoney.Inst.m_WinWord.OneceOver = true;
     }
 }
 void OnClickStart()
 {
     if (GameStatus == Game_Status.Idle)
     {
         GameStatus = Game_Status.Start;
     }
     IceAgeSlotControl.Inst.SlotStartReady();  //執行轉動
 }
Example #3
0
 private void Awake()
 {
     instance = this;//definimos a nossa instancia
     //Inicializamos a nossa lista
     PipeList = new List <Pipe>();
     SpawnInitialGround();
     SpawnInitialClouds();
     PipeSpawnTimerMax = 1f;             //spawna um pipe a cada segundo
     SetDifficulty(Difficulty.Easy);
     state = Game_Status.WaitingToStart; //definimos o estado do jogo
 }
 void OnClickMoneyDouble()
 {   //按下比倍
     GameStatus = Game_Status.MiniGame;
     if (MiniGameName == "ShotGame" || MiniGameName == "BreakGame")
     {
         MiniGameChangeScene.Inst.IsBonusDouble = true;
     }
     if (MiniGameName != "JP")
     {
         MiniGameName = "DoubleUp";
     }
     MiniGameChangeScene.Inst.GotoChangeScene("DoubleUp");                             //切換進場動畫
     MiniGameChangeScene.Inst.MiniGameEnd = false;
     IceAgeButtonControl.Inst.SetDoubleUpGameButtonShow();                             //設定按鈕
     IceAgeWinMoney.Inst.Reseat = true;                                                //重置WinMoney動畫
     IceAgeLineAnimControl.Inst.ReSetLineAnim();                                       //重置連線特效
     IceAge_JP_Control.Inst.JPAnim.GetComponent <UISprite>().enabled          = false; //關閉JP特效
     IceAge_JP_Control.Inst.JPAnim.GetComponent <UISpriteAnimation>().enabled = false;
 }
Example #5
0
    void Update()
    {
        switch (game_status) {
        case Game_Status.Over:
            game_status = Game_Status.Normal;
            print(Player.player_status);
            if(Player.player_status == Player.Player_Status.Over){
                StartCoroutine(WaitAndLoad(0.5f));
            }
            print ("over");
            break;
        case Game_Status.Pass:
            int currentLevel = Application.loadedLevel;
            int nextLevel = currentLevel +1;
            print(nextLevel);
            game_status = Game_Status.Normal;

            Application.LoadLevel(nextLevel);
            break;
        default:
            break;
        }
    }
Example #6
0
 private void Level_onDied(object sender, EventArgs e)
 {
     state = Game_Status.BirdIsDead;
 }
Example #7
0
 private void Level_onStart(object sender, EventArgs e)
 {
     state = Game_Status.Playing;
 }
Example #8
0
 void Start()
 {
     DontDestroyOnLoad(gameObject);
     game_status = Game_Status.Normal;
 }
Example #9
0
 void GameStart()
 {
     this.gameStartPanel.SetActive(false);
     game_Status = Game_Status.GameRunning;
     LoadScene("SelectLevel");
 }
Example #10
0
 // Start is called before the first frame update
 void Start()
 {
     game_Status   = Game_Status.GameStart;
     player_Status = player.player_Status;
     score         = 0;
 }
    public void GetBetResult()
    {
        if (IceAgeManager.IsBonus)
        {
            BonusNumber = IceAgeManager.BonusNumber;
            switch (BonusNumber)
            {
            case 27:        //射擊
                BonusGameText.GetComponent <UISprite>().enabled = true;
                BonusGameText.GetComponent <UISpriteAnimation>().ResetToBeginning();
                BonusGameText.GetComponent <UISpriteAnimation>().enabled = true;
                GameStatus   = Game_Status.MiniGame;
                MiniGameName = "ShotGame";
                ReStartTimer = 0.01f;
                IceAgeLineAnimControl.Inst.PlayLineAnim(true);       //顯示得獎特效
                IceAgeButtonControl.Inst.SetMoneyDoubleButtonShow(); //設定按鈕
                break;

            case 36:        //敲蛋
                BonusGameText.GetComponent <UISprite>().enabled = true;
                BonusGameText.GetComponent <UISpriteAnimation>().ResetToBeginning();
                BonusGameText.GetComponent <UISpriteAnimation>().enabled = true;
                GameStatus   = Game_Status.MiniGame;
                MiniGameName = "BreakGame";
                ReStartTimer = 0.01f;
                IceAgeLineAnimControl.Inst.PlayLineAnim(true);       //顯示得獎特效
                IceAgeButtonControl.Inst.SetMoneyDoubleButtonShow(); //設定按鈕
                break;

            case 37:        //JP
                GameStatus   = Game_Status.GetJP;
                MiniGameName = "JP";
                IceAgeLineAnimControl.Inst.PlayLineAnim(true);       //顯示得獎特效
                IceAgeButtonControl.Inst.SetMoneyDoubleButtonShow(); //設定按鈕
                IceAge_JP_Control.Inst.JPAnim.GetComponent <UISprite>().enabled = true;
                IceAge_JP_Control.Inst.JPAnim.GetComponent <UISpriteAnimation>().ResetToBeginning();
                IceAge_JP_Control.Inst.JPAnim.GetComponent <UISpriteAnimation>().enabled = true;
                ReStartTimer = 1.0f;        //一秒後 開放比倍與得分按鈕
                break;

            default:
                break;
            }
        }
        else
        {
            if (IceAgeManager.m_BetResult.m_byFreeRoundCnt != 0)
            {
                if (IceAgeManager.m_BetResult.m_byFreeRoundCnt != 20 && IceAgeManager.m_BetResult.m_dicLineAward.Count != 0)
                {                                                   //FreeGame中 正常得獎
                    IceAgeLineAnimControl.Inst.PlayLineAnim(false); //顯示得獎特效
                }
                else
                {                                                     //轉到FreeGame時 FreeRoundCnt = 20
                    GameStatus = Game_Status.FreeGame;                //進入FreeGame
                    IceAgeLineAnimControl.Inst.PlayFreeGameSlotBox(); //顯示鑽石Icon的紅外框
                    FreeGame_Control.Inst.ChangeGameTitle(false);     //調整背景 與 遊戲標題
                    IceAgeBackControl.Inst.m_AnimControl.SetBool("IsDay", false);
                    //鎖定按鈕
                    IceAgeButtonControl.Inst.SetFreeGameButton();
                    ReStartTimer = 0.01f;
                }
            }
            else
            {
                if (GameStatus == Game_Status.FreeGame)
                {   //調整背景 與 遊戲標題
                    FreeGame_Control.Inst.ChangeGameTitle(true);
                    IceAgeBackControl.Inst.m_AnimControl.SetBool("IsDay", true);
                    GameStatus = Game_Status.SlotMoving;    //變更遊戲狀態
                    //恢復顯示投注金額
                    IceAgeButtonControl.Inst.BetValue.text    = (IceAgeButtonControl.Inst.NumberOfBets * GameConnet.m_PMachineConfig.m_usBetMoney * GameConnet.m_PMachineConfig.m_byMaxLine).ToString();
                    IceAgeButtonControl.Inst.BetSetValue.text = IceAgeButtonControl.Inst.BetValue.text;
                }

                if (IceAgeManager.m_BetResult.m_dicLineAward.Count != 0)
                {
                    IceAgeLineAnimControl.Inst.PlayLineAnim(false);      //顯示得獎特效
                    IceAgeButtonControl.Inst.SetMoneyDoubleButtonShow(); //顯示按鈕
                    IceAgeWinMoney.Inst.m_WinWord.Loop = false;          //WinMoney 特效停在畫面上Loop
                }
                else
                {                                                                                        //沒有獎項
                    IceAgeSoundControl.Inst.PlaySound(IceAgeSoundControl.SoundName.NotGetAwards, false); //播放音效
                    if (IceAgeButtonControl.Inst.AutoTimes == 0)
                    {
                        IceAgeButtonControl.Inst.SetStopButton();                                          // 次數 = 0  結束轉動 設定按鈕狀態
                    }
                    else
                    {
                        GameStatus   = Game_Status.WaitMoneySlot;
                        ReStartTimer = 1.0f; //若還有自動次數 等待一秒後 轉動
                    }
                }
            }
        }
        //使用道具結束 把道具使用中顯示關閉
        if (IceAgeManager.m_BetResult.m_uiUseItemID > 0)
        {
            IceAgeItemUse.m_ItemClose = true;
        }
        //IceAgeManager.GetAward = false;
    }