Esempio n. 1
0
 public override void start()
 {
     base.start();
     mSocketManager      = new SocketManager();
     mGameConfig         = new GameConfig();
     mGameUtility        = new GameUtility();
     mMaterialManager    = new MaterialManager();
     mHeadTextureManager = new HeadTextureManager();
     mMahjongSystem      = new MahjongSystem();
 }
Esempio n. 2
0
 public override void notifyConstructDone()
 {
     base.notifyConstructDone();
     if (mGame == null)
     {
         mGame               = Game.instance as Game;
         mGameConfig         = mGame.getSystem <GameConfig>();
         mHeadTextureManager = mGame.getSystem <HeadTextureManager>();
         mLogSystem          = mGame.getSystem <LogSystem>();
         mDataCenter         = mGame.getSystem <DataCenter>();
         mMonsterManager     = mGame.getSystem <MonsterManager>();
     }
 }
Esempio n. 3
0
 public override void notifyConstructDone()
 {
     base.notifyConstructDone();
     if (mGame == null)
     {
         mGame               = Game.instance as Game;
         mGameConfig         = mGame.getGameConfig();
         mMahjongSystem      = mGame.getMahjongSystem();
         mMaterialManager    = mGame.getMaterialManager();
         mHeadTextureManager = mGame.getHeadTextureManager();
         mSocketNetManager   = mGame.getSocketManager();
     }
 }
Esempio n. 4
0
 public override void notifyConstructDone()
 {
     base.notifyConstructDone();
     if (mGame == null)
     {
         mGame               = Game.instance as Game;
         mGameConfig         = mGame.getSystem <GameConfig>();
         mMahjongSystem      = mGame.getSystem <MahjongSystem>();
         mHeadTextureManager = mGame.getSystem <HeadTextureManager>();
         mSocketNetManager   = mGame.getSystem <SocketManager>();
         mLogSystem          = mGame.getSystem <LogSystem>();
     }
 }
Esempio n. 5
0
 public override void destroy()
 {
     mSocketManager.destroy();
     mGameConfig.destory();
     mMaterialManager.destroy();
     mHeadTextureManager.destroy();
     mMahjongSystem.destroy();
     mSocketManager      = null;
     mGameConfig         = null;
     mGameUtility        = null;
     mMaterialManager    = null;
     mHeadTextureManager = null;
     mMahjongSystem      = null;
     // 最后调用基类的destroy,确保资源被释放完毕
     base.destroy();
 }
Esempio n. 6
0
    public virtual void notifyConstructDone()
    {
        mGameFramework     = GameFramework.mGameFramework;
        mCommandSystem     = mGameFramework.getSystem(Typeof <CommandSystem>()) as CommandSystem;
        mAudioManager      = mGameFramework.getSystem(Typeof <AudioManager>()) as AudioManager;
        mGameSceneManager  = mGameFramework.getSystem(Typeof <GameSceneManager>()) as GameSceneManager;
        mCharacterManager  = mGameFramework.getSystem(Typeof <CharacterManager>()) as CharacterManager;
        mLayoutManager     = mGameFramework.getSystem(Typeof <LayoutManager>()) as LayoutManager;
        mKeyFrameManager   = mGameFramework.getSystem(Typeof <KeyFrameManager>()) as KeyFrameManager;
        mGlobalTouchSystem = mGameFramework.getSystem(Typeof <GlobalTouchSystem>()) as GlobalTouchSystem;
        mShaderManager     = mGameFramework.getSystem(Typeof <ShaderManager>()) as ShaderManager;
#if !UNITY_IOS && !NO_SQLITE
        mSQLite = mGameFramework.getSystem(Typeof <SQLite>()) as SQLite;
#endif
        mDataBase                = mGameFramework.getSystem(Typeof <DataBase>()) as DataBase;
        mCameraManager           = mGameFramework.getSystem(Typeof <CameraManager>()) as CameraManager;
        mResourceManager         = mGameFramework.getSystem(Typeof <ResourceManager>()) as ResourceManager;
        mApplicationConfig       = mGameFramework.getSystem(Typeof <ApplicationConfig>()) as ApplicationConfig;
        mFrameConfig             = mGameFramework.getSystem(Typeof <FrameConfig>()) as FrameConfig;
        mObjectPool              = mGameFramework.getSystem(Typeof <ObjectPool>()) as ObjectPool;
        mInputManager            = mGameFramework.getSystem(Typeof <InputManager>()) as InputManager;
        mSceneSystem             = mGameFramework.getSystem(Typeof <SceneSystem>()) as SceneSystem;
        mClassPool               = mGameFramework.getSystem(Typeof <ClassPool>()) as ClassPool;
        mClassPoolThread         = mGameFramework.getSystem(Typeof <ClassPoolThread>()) as ClassPoolThread;
        mListPool                = mGameFramework.getSystem(Typeof <ListPool>()) as ListPool;
        mListPoolThread          = mGameFramework.getSystem(Typeof <ListPoolThread>()) as ListPoolThread;
        mDictionaryPool          = mGameFramework.getSystem(Typeof <DictionaryPool>()) as DictionaryPool;
        mDictionaryPoolThread    = mGameFramework.getSystem(Typeof <DictionaryPoolThread>()) as DictionaryPoolThread;
        mBytesPool               = mGameFramework.getSystem(Typeof <BytesPool>()) as BytesPool;
        mBytesPoolThread         = mGameFramework.getSystem(Typeof <BytesPoolThread>()) as BytesPoolThread;
        mAndroidPluginManager    = mGameFramework.getSystem(Typeof <AndroidPluginManager>()) as AndroidPluginManager;
        mAndroidAssetLoader      = mGameFramework.getSystem(Typeof <AndroidAssetLoader>()) as AndroidAssetLoader;
        mHeadTextureManager      = mGameFramework.getSystem(Typeof <HeadTextureManager>()) as HeadTextureManager;
        mTimeManager             = mGameFramework.getSystem(Typeof <TimeManager>()) as TimeManager;
        mMovableObjectManager    = mGameFramework.getSystem(Typeof <MovableObjectManager>()) as MovableObjectManager;
        mEffectManager           = mGameFramework.getSystem(Typeof <EffectManager>()) as EffectManager;
        mTPSpriteManager         = mGameFramework.getSystem(Typeof <TPSpriteManager>()) as TPSpriteManager;
        mSocketFactory           = mGameFramework.getSystem(Typeof <SocketFactory>()) as SocketFactory;
        mSocketFactoryThread     = mGameFramework.getSystem(Typeof <SocketFactoryThread>()) as SocketFactoryThread;
        mPathKeyframeManager     = mGameFramework.getSystem(Typeof <PathKeyframeManager>()) as PathKeyframeManager;
        mEventSystem             = mGameFramework.getSystem(Typeof <EventSystem>()) as EventSystem;
        mStringBuilderPool       = mGameFramework.getSystem(Typeof <StringBuilderPool>()) as StringBuilderPool;
        mStringBuilderPoolThread = mGameFramework.getSystem(Typeof <StringBuilderPoolThread>()) as StringBuilderPoolThread;
#if USE_ILRUNTIME
        mILRSystem = mGameFramework.getSystem(Typeof <ILRSystem>()) as ILRSystem;
#endif
    }