public void InitDataWaiting()
 {
     if (_BOL_ChoiceHero == null)
     {
         _BOL_ChoiceHero = listStateScene.BOL_ChoiceHero;
         _BOL_ChoiceHero.InitData();
     }
     //if (_BOL_ShowPlayer == null) {
     //	_BOL_ShowPlayer = listStateScene.BOL_ShowPlayer;
     //	_BOL_ShowPlayer.InitData();
     //}
     isInitSuccess = true;
     if (_BOL_PlayBattleleft != null)
     {
         _BOL_PlayBattleleft.ResetData();
         _BOL_PlayBattleleft.SelfDestruction();
         _BOL_PlayBattle_left = null;
         _BOL_PlayBattleleft  = null;
     }
     if (_BOL_PlayBattleright != null)
     {
         _BOL_PlayBattleright.ResetData();
         _BOL_PlayBattleright.SelfDestruction();
         _BOL_PlayBattle_right = null;
         _BOL_PlayBattleright  = null;
     }
     panelUserInfo.RefreshGoldInfo();
 }
Exemple #2
0
    public void ResetBattle()
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("ResetBattle", Color.red));
#endif
        Destroy(panelplayerLeft);
        Destroy(panelplayerRight);
        panelplayerLeft   = null;
        panelplayerRight  = null;
        _panelplayerLeft  = null;
        _panelplayerRight = null;
    }
Exemple #3
0
    // show matrix battle
    public void InitDataBattle()
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("InitDataBattle", Color.red));
#endif

        listBattle = new MySimplePoolManager();
        float ratio = 1.4f / 2.81203f;
        Debugs.LogRed("init battle");
        panelplayerLeft  = SpawnHeroBattle(Constant.CHAIR_LEFT);
        _panelplayerLeft = panelplayerLeft.GetComponent <BOL_Battle_PlayerInGame>();
        //_panelplayerLeft.InitFirstData(1);
        Piece_Control pieceleft = _panelplayerLeft.GetComponent <Piece_Control>();
        panelplayerRight  = SpawnHeroBattle(Constant.CHAIR_RIGHT);
        _panelplayerRight = panelplayerRight.GetComponent <BOL_Battle_PlayerInGame>();
        //_panelplayerRight.InitFirstData(-1);
        Piece_Control pieceRight = _panelplayerRight.GetComponent <Piece_Control>();
        listBattle.AddObject(pieceleft);
        listBattle.AddObject(pieceRight);
        ResetChoiceHero(true);
    }
Exemple #4
0
    // show panel choice hero
    public void InitDataChoice()
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("InitDataChoice", Color.red));
#endif

        if (_mainChoice == null)
        {
            _mainChoice    = SpawnMainChoice();
            bOL_ChoiceHero = _mainChoice.GetComponent <BOL_ChoiceHero>();
        }
        else
        {
            bOL_ChoiceHero = _mainChoice.GetComponent <BOL_ChoiceHero>();
        }
        Piece_Control piece = _mainChoice.GetComponent <Piece_Control>();
        _myCVChoiceHero.AddObject(piece);
        bOL_ChoiceHero.InitData();
        bOL_ChoiceHero.ResetData();
        if (panelplayerLeft != null)
        {
            DespawnGameObject(panelplayerLeft);
            _panelplayerLeft = null;
        }
        if (panelplayerRight != null)
        {
            DespawnGameObject(panelplayerRight);
            _panelplayerRight = null;
        }
        if (_objectShowPlayer == null)
        {
            bOL_ChoiceHero.SetActiveChoiceHero(true);
        }
        else
        {
            bOL_ChoiceHero.SetActiveChoiceHero(false);
        }
    }