Beispiel #1
0
        //public SDKPlatformManager sdkManager = SDKPlatformManager.Instance;

        //public UIManager uiManager = UIManager.Instance;


        //private void Awake()
        //{
        //    Application.targetFrameRate = targetFrameRate;
        //    UnityMonoDriver.s_instance = this;
        //    if (base.transform.parent != null)
        //    {
        //        DontDestroyOnLoad(base.transform.parent);
        //    }
        //    InvokeRepeating("Tick",0f, 0.01f);
        //    resourceManager.Init(GameObject.Find("ResourceManager").GetComponent<GameResourceManager>());
        //    uiManager.Init();
        //}
        //private void Start()
        //{
        //    sdkManager.Init();
        //    sdkManager.Install();
        //    AudioManagerBase.Instance.Init();
        //    clientGameStateManager.Init();
        //    clientGameStateManager.EnterDefaultState();
        //}
        //private void Update()
        //{
        //    sdkManager.Update();
        //    resourceManager.Update();
        //    AudioManagerBase.Instance.Update();
        //    uiManager.Update(Time.deltaTime);
        //}
        //private void Tick()
        //{
        //    //StoryManager.singleton.Tick();
        //    TimerManager.Tick();
        //    FrameTimerManager.Tick();
        //}
        //private void OnApplicationFocus(bool focus)
        //{
        //    if (focus)
        //    {
        //        if (GameControllerBase.thePlayer != null)
        //        {
        //            GameControllerBase.thePlayer.m_skillManager.Compensation(prePay);
        //            TimerManager.AddTimer(1000, 0, () => { prePay = 0; });
        //        }
        //    }
        //}
        //private float prePause = 0;
        //private float prePay = 0;
        //private void OnApplicationPause(bool pause)
        //{
        //    if (pause)
        //    {
        //        prePause = Time.realtimeSinceStartup;
        //    }
        //    else
        //    {
        //        float cur = Time.realtimeSinceStartup;
        //        GameControllerBase.StartTime = cur;
        //        float pay = cur - prePause;
        //        if (GameControllerBase.thePlayer != null)
        //        {
        //            GameControllerBase.thePlayer.m_skillManager.Compensation(-prePay);
        //            prePay = 0;
        //            GameControllerBase.thePlayer.m_skillManager.Compensation(pay);
        //        }
        //    }
        //}
        private void Awake()
        {
            CaomaoDriver.Instance = this;
            DontDestroyOnLoad(this.gameObject);
            UIRoot = GameObject.FindGameObjectWithTag("UIRoot").transform;
            DontDestroyOnLoad(UIRoot.gameObject);
            GameSettingModule  = this.CreateModule <GameSettingModule>();
            UIModule           = this.CreateModule <CUIModule>();
            GameStateModule    = this.CreateModule <ClientGameStateModule>();
            ResourceModule     = this.CreateModule <ResourceModule>();
            SceneLoadModule    = this.CreateModule <SceneLoadModule>();
            WordFilterModule   = this.CreateModule <WordFilterModule>();
            LocalizationModule = this.CreateModule <LocalizationModule>();
            WebRequestModule   = this.CreateModule <WebRequestModule>();
            RedPointModule     = this.CreateModule <RedPointModule>();
            HotFixModule       = this.CreateModule <HotFixModule>();
            TimerModule        = this.CreateModule <TimerModule>();
            AudioModule        = this.CreateModule <AudioModule>();
            DataModule         = this.CreateModule <DataModule>();
            NewbieHelpModule   = this.CreateModule <NewbieHelpModule>();
            this.modules.Awake();
        }
Beispiel #2
0
 /// <summary>
 /// Creates an instance of the <see cref="VolumeSampleProcessor"/> class.
 /// </summary>
 /// <param name="module">Reference to the module this processor belongs to.</param>
 public VolumeSampleProcessor(IAudioModule module)
 {
     _module   = module;
     IsEnabled = true;
     Priority  = int.MaxValue;
 }