Exemplo n.º 1
0
    public override void InitData()
    {
#if TEST
        Debug.Log(Debugs.ColorString("init data choice hero", Color.red));
#endif
        ins = this;
        //btnStandupLeft.gameObject.SetActive(false);
        //btnStandupRight.gameObject.SetActive(false);
        btnChoiceChairLeft.isChoiceChair  = false;
        btnChoiceChairRight.isChoiceChair = false;
        btnChoiceChairLeft.btnStandUp.gameObject.SetActive(false);
        btnChoiceChairRight.btnStandUp.gameObject.SetActive(false);

        canvasHeroChoice.worldCamera = BOL_Manager.instance.mainCamera.mainCamera;
        listProcessAction            = new List <IEnumerator>();
        StartCoroutine(StartActionStandDown());
#if UNITY_ANDROID
        tableChoiceRect.localScale = Vector3.one * ((0.8f / 2.81203f) * BOL_Manager.instance.mainCamera.mainCamera.orthographicSize);
        //TableChoice.GetComponent<RectTransform>().localScale = Vector3.one * ((0.8f / 2.81203f) * BOL_Manager.instance.MainCam.orthographicSize);
#endif
#if UNITY_IOS
        tableChoiceRect.localScale = Vector3.one * 0.8f;
        //TableChoice.GetComponent<RectTransform>().localScale = Vector3.one * 0.8f;
#endif
        vector_tablechoice = TableChoice.transform.localScale;
        TableChoice.SetActive(false);
        betInGame.text = BOL_Manager.instance.bol_Table_Info.bet.ToString();
        ChoiceChairPosition();
        betInGame.onEndEdit.AddListener(SetBetInGame);
        ReceiveReadyGame(false);
        btnStartGame.onClick.AddListener(() =>
        {
            if (BOL_Manager.instance.CanPlayMusicAndSfx())
            {
                MyAudioManager.instance.PlaySfx(GameInformation.instance.globalAudioInfo.sfx_Click);
            }
            if (btnStartGame.transform.GetChild(0).gameObject.activeSelf)
            {
                SetReadyGame(true);
            }
            else
            {
                SetReadyGame(false);
            }
        });
    }
Exemplo n.º 2
0
    public void ResetChoiceHero(bool isDetroy = false)
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("ResetChoiceHero", Color.red));
#endif

        if (isDetroy)
        {
            Destroy(_mainChoice);
            _mainChoice    = null;
            bOL_ChoiceHero = null;
            _myCVChoiceHero.ClearAllObjectsNow();
        }
        else
        {
            bOL_ChoiceHero.ResetData();
        }
    }
Exemplo n.º 3
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);
        }
    }
Exemplo n.º 4
0
 private void OnDestroy()
 {
     ins = null;
 }
Exemplo n.º 5
0
 public override void SelfDestruction()
 {
     base.SelfDestruction();
     ins = null;
 }