コード例 #1
0
ファイル: DamageCell.cs プロジェクト: midgithub/notes
 void Awake()
 {
     m_transform   = this.transform;
     m_gameManager = CoreEntry.gGameMgr;
     m_skillMgr    = CoreEntry.gSkillMgr;
     m_gameDBMgr   = CoreEntry.gGameDBMgr;
 }
コード例 #2
0
ファイル: SkillBase.cs プロジェクト: midgithub/notes
        void Awake()
        {
            m_transform = this.transform;
            m_gameDBMgr = CoreEntry.gGameDBMgr;



            //m_speed = 2;
        }
コード例 #3
0
ファイル: GravityMotionBase.cs プロジェクト: midgithub/notes
        public void Init()
        {
            m_gameDataBase = CoreEntry.gGameDBMgr;

            m_actor      = this.gameObject.GetComponent <ActorObj>();
            m_BehitState = m_actor.behitState;

            m_isUseGravity      = false;
            m_gravityMotionType = GravityMotionType.GMT_NONE;

            m_attackObjForward = Vector3.zero;
            m_startToSkyPos    = Vector3.zero;

            F_ACCE = 0;

            nCount = 0;

            m_curRadius = m_actor.GetColliderRadius();

            CancelInvoke("AutoCancelStatic");
            CancelInvoke("MoveDistanceEnd");
        }
コード例 #4
0
ファイル: GameLogicMgr.cs プロジェクト: midgithub/notes
        //游戏开始入口
        void Start()
        {
            //获取需要的管理器
            m_gameDBMgr = CoreEntry.gGameDBMgr;
            m_eventMgr  = CoreEntry.gEventMgr;
            //m_ResourceLoader = CoreEntry.gResLoader;
            m_sceneMgr = CoreEntry.gSceneMgr;
            //m_ObjPoolMgr = CoreEntry.gObjPoolMgr;
            //m_skillComboMgr = CoreEntry.gSkillComboMgr;

            RegisterEvent();

            CoreEntry.gEventMgr.AddListener(GameEvent.GE_FuBen_exit, OnExitFuBen);

            CoreEntry.gEventMgr.AddListener(GameEvent.GE_FuBen_loading_end, OnLoadingEnd);


            CoreEntry.gEventMgr.AddListener(GameEvent.GE_UI_PANEL_CONNECT_START, OnEventConnectStart);
            CoreEntry.gEventMgr.AddListener(GameEvent.GE_UI_PANEL_CONNECT_SUCCESS, OnEventConnectSuccess);
            CoreEntry.gEventMgr.AddListener(GameEvent.GE_MSG_FUBEN_REQUIREAWARD, GE_MSG_FUBEN_REQUIREAWARD);


            CoreEntry.gEventMgr.AddListener(GameEvent.GE_MSG_FUBEN_SYNRESULT, OnServerPushItemData);
        }
コード例 #5
0
ファイル: RunToAttackState.cs プロジェクト: midgithub/notes
 void Awake()
 {
     m_gameDBMgr = CoreEntry.gGameDBMgr;
 }
コード例 #6
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>();
            }
        }