Exemplo n.º 1
0
    public void ActivePlayerBlood(bool isEnabled)
    {
        PlayerSpeedSprite.fillAmount = 0f;
        PlayerSpeedSprite.enabled    = isEnabled;
        if (!isEnabled)
        {
            //PlayerType = -1;
            DaoJuTextSprite.enabled = false;
            DaoJuSprite.enabled     = false;
        }

        if (isEnabled)
        {
            if (PlayerType != PlayerBtState.PLAYER_1)
            {
                int val = ActiveDaJuCtrl.GetInstanceP1().GetTypeDaoJuActive();
                if (val > 0 && val < 6)
                {
                    ActiveDaoJuType(val);
                }
            }
            else
            {
                if (TypeDaoJuActive > 0 && TypeDaoJuActive < 6)
                {
                    ActiveDaoJuType(TypeDaoJuActive);
                }
            }
        }
    }
    public void ResetIsActivePlayer()
    {
        IsActivePlayer = false;
        ZhunXingCtrl.GetInstance().ClosePlayerZhunXing();
        DirectionInfoCtrl.GetInstance().HiddenDirWrong();
        PlayerYueJieCtrl.GetInstance().ClosePlayerYueJie();

        ActiveDaJuCtrl.GetInstanceP1().ActivePlayerBlood(false);
        ActiveDaJuCtrl.GetInstanceP2().ActivePlayerBlood(false);
    }
    public void ActivePlayerOne()
    {
        if (IsActivePlayer)
        {
            return;
        }

        if (DaoJiShiCtrl.TimeVal <= 1)
        {
            return;
        }

        if (FinishPanelCtrl.GetInstance().CheckIsActiveFinish())
        {
            return;
        }

        bool isEnablePlayer = false;

        PlayHitStartBtAudio();
        if (!GlobalData.GetInstance().IsFreeMode)
        {
            if (GlobalData.GetInstance().Icoin >= GlobalData.GetInstance().XUTOUBI)
            {
                StartBtCtrl.GetInstanceP2().InitStartBtCartoon();
            }
            else
            {
                InsertCoinCtrl.GetInstanceP2().ShowInsertCoin();
            }
            HeadCtrlPlayer.GetInstanceP1().StopColor();
            isEnablePlayer = true;
        }
        else
        {
            HeadCtrlPlayer.GetInstanceP1().StopColor();
            HeadCtrlPlayer.GetInstanceP2().PlayColor();
            StartBtCtrl.GetInstanceP2().InitStartBtCartoon();
            isEnablePlayer = true;
        }

        if (isEnablePlayer)
        {
            IsActivePlayer = true;
            CloseStartBtCartoon();
            if (GlobalData.GetInstance().gameMode == GameMode.SoloMode)
            {
                ActiveDaJuCtrl.GetInstanceP1().ActivePlayerBlood(true);
                DaoJiShiCtrl.GetInstance().StopDaoJiShi();
                GameOverCtrl.GetInstance().HiddenContinueGame();
                GameTimeCtrl.GetInstance().InitPlayGameTime(1);
                //GameCtrlXK.GetInstance().InitFillPlayerBlood();
            }
        }
    }
Exemplo n.º 4
0
    public void SetPlayerMvSpeedSpriteInfo(float val)
    {
        if (StartBtCtrl.GetInstanceP1().CheckIsActivePlayer())
        {
            ActiveDaJuCtrl.GetInstanceP1().SetPlayerMvSpeedSpriteInfo(val);
        }

        if (StartBtCtrl.GetInstanceP2().CheckIsActivePlayer())
        {
            ActiveDaJuCtrl.GetInstanceP2().SetPlayerMvSpeedSpriteInfo(val);
        }
    }
Exemplo n.º 5
0
    void ActivePlayerDaoJu(GameObject spriteObj, DaoJuTypeIndex val, int key)
    {
        if (key == 1)
        {
            if (StartBtCtrl.GetInstanceP1().CheckIsActivePlayer())
            {
                ActiveDaJuCtrl.GetInstanceP1().ActiveDaoJuType((int)val);
                HeadCtrlPlayer.GetInstanceP1().InitChangeHeadUI();
            }
        }
        else if (key == 2)
        {
            if (StartBtCtrl.GetInstanceP2().CheckIsActivePlayer())
            {
                ActiveDaJuCtrl.GetInstanceP2().ActiveDaoJuType((int)val);
                HeadCtrlPlayer.GetInstanceP2().InitChangeHeadUI();
            }
        }

        //Debug.Log("ActivePlayerDaoJu -> key = " + key);
        Destroy(spriteObj);
    }