示例#1
0
        public void Clear()
        {
            for (int i = 0; i < matchRankItemList.Count; i++)
            {
                matchRankItemList[i].Clear();
            }
            matchRankItemList.Clear();
            matchRankItemList = null;

            for (int i = 0; i < matchRankItemObjList.Count; i++)
            {
                GameObject.DestroyImmediate(matchRankItemObjList[i]);
            }
            matchRankItemObjList.Clear();
            matchRankItemObjList = null;

            if (horseList != null)
            {
                horseList.Clear();
            }
            horseList    = null;
            funcs        = null;
            uiData       = null;
            battleModule = null;
        }
示例#2
0
        public void Init(UIBattleMainData data)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData       = data;

            funcs     = battleModule.matchInit.funcs;
            horseList = funcs.GetHorses();
            uiData.button_MatchListOpen.onClick.AddListener(OnClickMatchListOpen);
        }
示例#3
0
        private System.Random randomBySeed;     //随机数

        public void Init(Transform transParent) //只初始化一次UI数据
        {
            battleModule   = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            trans          = transParent;
            recttrans      = trans.gameObject.GetComponent <RectTransform>();
            funcs          = battleModule.matchInit.funcs;
            endPos         = funcs.GetEnd();
            randomBySeed   = funcs.GetRandomBySeed();
            go_RankIconMy  = transParent.Find("RankIconMy").gameObject;
            image_RankIcon = transParent.Find("RankIcon").GetComponent <Image>();
        }
示例#4
0
 public void Clear()
 {
     if (timeCountDown != null)
     {
         timeCountDown.Dispose();
     }
     timeCountDown = null;
     uiData        = null;
     myRunData     = null;
     funcs         = null;
     matchModule   = null;
     battleModule  = null;
 }
示例#5
0
        public void Init(UIBattleMainData data)
        {
            matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            funcs       = matchModule.matchInit.funcs;
            myRunData   = matchModule.myRunData;
            uiData      = data;

            horseList      = funcs.GetHorses();
            preEnsureValue = 0;
            uiData.slider_SliderEnsure.value = 1f;
            diWidth  = uiData.recttrans_DyRank.rect.width;
            diHeight = uiData.recttrans_DyRank.rect.height;
            ShowDyRankList();
        }
示例#6
0
        private int maxMultiple = 1;  //快进最大倍数

        public void Init(UIBattleMainData data)
        {
            matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData      = data;

            funcs = matchModule.matchInit.funcs;

            maxMultiple             = ModelComTools.Config.GetBaseByID(99005128).param1; //快进最大倍数
            uiData.text_AddNum.text = "X1";
            uiData.button_RecoveryBtn.gameObject.SetActive(false);
            uiData.button_PauseBtn.gameObject.SetActive(true);

            uiData.button_RecoveryBtn.onClick.AddListener(OnClickRecoveryBtn);
            uiData.button_PauseBtn.onClick.AddListener(OnClickPauseBtn);
            uiData.button_FastForward.onClick.AddListener(OnClickFastForward);
            uiData.button_CloseBtn.onClick.AddListener(OnClickCloseBtn);
        }
示例#7
0
        public void Clear()
        {
            for (int i = 0; i < matchRankItemList.Count; i++)
            {
                matchRankItemList[i].Clear();
            }
            matchRankItemList.Clear();
            matchRankItemList = null;

            for (int i = 0; i < matchRankItemObjList.Count; i++)
            {
                GameObject.DestroyImmediate(matchRankItemObjList[i]);
            }
            matchRankItemObjList.Clear();
            matchRankItemObjList = null;

            funcs       = null;
            uiData      = null;
            myRunData   = null;
            matchModule = null;
        }
示例#8
0
        public void Init(UIBattleMainData data)
        {
            matchModule  = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            funcs        = matchModule.matchInit.funcs;
            myRunData    = matchModule.myRunData;
            uiData       = data;

            timeCountDown = ComponentFactory.Create <TimeCountDownComponent>();
            endPos        = funcs.GetEnd();
            SetMyPosTo2D();

            if (battleModule.IsPlayback)
            {
                uiData.recttrans_m_GroundState.localPosition -= new Vector3(52, 0, 0);
            }
            //preEnsureValue = 0;
            //preSpeedValue = 0;

            //uiData.slider_m_SpeedProgress.value = 1f;
            //uiData.slider_SliderEnsure.value = 1f;
            uiData.toggle_ToggleName.onValueChanged.AddListener(OnToggleSwitchHeadClick);
        }
示例#9
0
 public void Clear()
 {
     funcs       = null;
     uiData      = null;
     matchModule = null;
 }