コード例 #1
0
        protected override void OnStart()
        {
            GameLevelCtrl t = GameLevelCtrl.Instance;

            base.OnStart();
            m_View = UISceneCtrl.Instance.Load(UISceneType.GameLevel).GetComponent <UIGameLevelView>();
            m_View.SetStepCount(false, 0);
            ChangeSceneCtrl.Instance.Show(ChangeSceneType.Open, Global.Instance.ChangeSceneTime, null);
            m_View.SetUI(Global.Instance.CurLevel);
            GridManager.Instance.CreateNode(Global.Instance.CurLevel);
            Monster.OnRoleStatusChange  += OnRoleStatusChange;
            Player.ValidLineCountChange += OnValidLineCountChange;
            Player.OnGuideEnd           += HideGuide;
            Turn(true);
            GuideObjList = new List <GameObject>();
            GuideObjList.Add(GridManager.Instance.GetCell(6, 2).gameObject);
            if (Global.Instance.CurLevel == 1)
            {
                ShowGuide();
            }
            else
            {
                HideGuide();
            }
        }
コード例 #2
0
        private void Start()
        {
            if (TestLevel > 0)
            {
                Map.Instance.Init(TestLevel);
            }
            else
            {
                Map.Instance.Init(Global.Instance.CurLevel);
            }

            UIGameLevelView view = UISceneCtrl.Instance.Load(UISceneType.GameLevel).GetComponent <UIGameLevelView>();

            view.SetUI();
            UIDispatcher.Instance.AddEventListen(ConstDefine.GameLevelSceneViewClickAudioBtn, OnGameLevelSceneViewClickAudioBtn);
            UIDispatcher.Instance.AddEventListen(ConstDefine.GameLevelSceneViewClickPauseBtn, OnGameLevelSceneViewClickPauseBtn);
            m_TriggerNumberObstaclesList        = new List <NumberObstacles>();
            ((RoleCtrl)m_Player).OnArriveTarget = OnPlayerArriveTarget;
            ((RoleCtrl)m_Player).OnAttackTarget = OnPlayerAttackTarget;
            NumberManager();
            Global.Instance.SetMusic();
        }