Beispiel #1
0
 void Awake()
 {
     m_transform   = this.transform;
     m_gameManager = CoreEntry.gGameMgr;
     m_skillMgr    = CoreEntry.gSkillMgr;
     m_gameDBMgr   = CoreEntry.gGameDBMgr;
 }
Beispiel #2
0
        public bool MiaoGuai()
        {
            LogMgr.UnityLog("call GmMgr MiaoGuai");

            SkillMgr gSkillMgr = CoreEntry.gSkillMgr;

            if (gSkillMgr.m_bMiaoGuai)
            {
                gSkillMgr.m_bMiaoGuai = false;
            }
            else
            {
                gSkillMgr.m_bMiaoGuai = true;
            }

            return(true);
        }
Beispiel #3
0
        public bool ShowSkillScope()
        {
            LogMgr.UnityLog("call GmMgr ShowSkillScope");

            SkillMgr gSkillMgr = CoreEntry.gSkillMgr;

            if (gSkillMgr.m_bShowSkillScope)
            {
                gSkillMgr.m_bShowSkillScope = false;
            }
            else
            {
                gSkillMgr.m_bShowSkillScope = true;
            }

            return(true);
        }
Beispiel #4
0
        public bool WuShang()
        {
            LogMgr.UnityLog("call GmMgr WuShang");

            SkillMgr gSkillMgr = CoreEntry.gSkillMgr;

            if (gSkillMgr.m_bWuShang)
            {
                gSkillMgr.m_bWuShang = false;
            }
            else
            {
                gSkillMgr.m_bWuShang = true;
            }



            return(true);
        }
Beispiel #5
0
        public static void CoreInit()
        {
            //设置横屏显示
            Screen.orientation = ScreenOrientation.AutoRotation;
            Screen.autorotateToLandscapeLeft      = true;
            Screen.autorotateToLandscapeRight     = true;
            Screen.autorotateToPortrait           = false;
            Screen.autorotateToPortraitUpsideDown = false;

            //所有全局组件挂在CoreRoot对象下,CoreRoot对象被设为加载场景时不被删除,保证它的全局存在
            //GameObject go = new GameObject("CoreRoot");



            if (m_baseTool == null)
            {
                m_baseTool = CoreRootObj.AddComponent <BaseTool>();
            }

            //    if (    m_teamMgr   ==null )
            //m_teamMgr = CoreRootObj.AddComponent<TeamMgr>();

            //         if (m_challengeTeamManager == null)
            //         m_challengeTeamManager = CoreRootObj.AddComponent<ChallengeTeamManager>();

            if (m_skillMgr == null)
            {
                m_skillMgr = CoreRootObj.AddComponent <SkillMgr>();
            }

            //if (m_skillComboMgr == null)
            //    m_skillComboMgr = CoreRootObj.AddComponent<SkillComboMgr>();

            if (m_gameDBMgr == null)
            {
                m_gameDBMgr = CoreRootObj.AddComponent <GameDBMgr>();
            }


            if (m_objPoolMgr == null)
            {
                m_objPoolMgr = CoreRootObj.AddComponent <ObjectPoolManager>();
            }

            if (m_GameObjPoolMgr == null)
            {
                m_GameObjPoolMgr = CoreRootObj.AddComponent <GameObjPoolMgr>();
            }

            if (m_behaviacSys == null)
            {
                m_behaviacSys = CoreRootObj.AddComponent <BehaviacSystem>();
            }

            if (m_gameMgr == null)
            {
                m_gameMgr = CoreRootObj.AddComponent <GameLogicMgr>();
            }

            if (eventTouchMono == null)
            {
                eventTouchMono = CoreRootObj.AddComponent <EventTouchMono>();
            }

            //        TaskMgr task = TaskMgr.Instance;
            //        NpcMgr npc = NpcMgr.Instance;
            //        DungeonMgr dungeon = DungeonMgr.Instance;
            if (null == m_sceneObjMgr)
            {
                m_sceneObjMgr = CoreRootObj.AddComponent <SceneObjMgr>();
            }
            MoveDispatcher.Instance.Init();

            if (null == m_morphMgr)
            {
                m_morphMgr = CoreRootObj.AddComponent <MorphMgr>();
            }
        }