public static IPromise <SoundConfig> InitSoundConfig()
    {
        IPromise <SoundConfig> p = ResourceLoaderPromise.Load <SoundConfig>(SOUND_CONFIG_PATH, Context.OutOfDungeon, ResourceLoadMode.Instantly);

        p.Then(tools => SoundConfig = tools);
        return(p);
    }
Exemplo n.º 2
0
    public void Set(SoundConfig config)
    {
        source      = GetComponent <AudioSource> ();
        this.config = config;

        if (config.ifCircle)
        {
            interval = config.interval;

            source.loop = interval <= 0;
            StartCoroutine("Circle");
        }

        volumeScale = config.volume;
        SetVolume();
        if (config.limit > 0)
        {
            if (!playing.ContainsKey(config.id))
            {
                playing.Add(config.id, new List <SoundPlayer> ());
            }

            playing [config.id].Add(this);
        }
    }
Exemplo n.º 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CharacterPortraitImage.Length != 0)
            {
                hash ^= CharacterPortraitImage.GetHashCode();
            }
            if (CharacterNameLockey.Length != 0)
            {
                hash ^= CharacterNameLockey.GetHashCode();
            }
            if (ContentTextLockey.Length != 0)
            {
                hash ^= ContentTextLockey.GetHashCode();
            }
            if (ContentImageName.Length != 0)
            {
                hash ^= ContentImageName.GetHashCode();
            }
            if (soundConfig_ != null)
            {
                hash ^= SoundConfig.GetHashCode();
            }
            if (ButtonLockey.Length != 0)
            {
                hash ^= ButtonLockey.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemplo n.º 4
0
 public void btnPlaySound()
 {
     if (!SoundConfig.IsOnSound())
     {
         return;
     }
     Source.clip = _PlayClip;
     Source.Play();
 }
Exemplo n.º 5
0
 public void soundDichuyenNguoc()
 {
     if (!SoundConfig.IsOnSound())
     {
         return;
     }
     Source.clip = _dichuyenNguocClip;
     Source.Play();
 }
Exemplo n.º 6
0
 void OnEnable()
 {
     for (var i = 0; i < 4; i++)
     {
         var newSource = gameObject.AddComponent <AudioSource>();
         newSource.playOnAwake = false;
         AudioSources[i]       = newSource;
         Configs[i]            = new SoundConfig(this);
     }
 }
Exemplo n.º 7
0
    public bool PlaySound(SoundConfig config)
    {
        AudioSource source = gameObject.AddComponent(typeof(AudioSource)) as AudioSource;

        source.volume = config.Volume;
        source.clip   = config.Clip;
        source.Play();
        Destroy(source, config.Clip.length + .2f);

        return(true);
    }
Exemplo n.º 8
0
 private void UpdateUiForMusicButton()
 {
     if (SoundConfig.IsOnSound())
     {
         _btnSound.GetComponent <UISprite>().spriteName = "sound";
     }
     else
     {
         _btnSound.GetComponent <UISprite>().spriteName = "sound-off";
     }
 }
Exemplo n.º 9
0
    private void Awake()
    {
        IsBGMMuted = PlayerPrefs.GetInt("IsBGMMuted", 0) == 1 ? IsBGMMuted = true : IsBGMMuted = false;
        IsSFXMuted = PlayerPrefs.GetInt("IsSFXMuted", 0) == 1 ? IsSFXMuted = true : IsSFXMuted = false;

        sfxAudioSources     = new List <AudioSource>();
        playingAudioSources = new Dictionary <string, AudioSource>();
        bgmAudioSource      = gameObject.AddComponent <AudioSource>();

        soundConfig = Resources.Load <SoundConfig>("Audio/SoundConfig");
        // defaultMixer = Resources.Load<AudioMixer>("Sound/DefaultMixer");
    }
Exemplo n.º 10
0
 //加载配置数据
 private IEnumerator LoadConfigs()
 {
     yield return(new WaitUntil(() => MissionConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => TaskConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => ItemConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => TreasureBoxConfig.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => RoleConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => ActionConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => SoundConfig.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => LevelConifg.IsLoadedOK())); RefreshProgress();
     yield return(new WaitUntil(() => PlayerDataManager.Init())); RefreshProgress();
     Debug.Log("<><MainSceneLoader.LoadConfigs>all configs loaded");
 }
Exemplo n.º 11
0
    public void OnOffMusic()
    {
        if (SoundConfig.IsOnSound())
        {
            SoundConfig.TurnOffSound();
        }
        else
        {
            SoundConfig.TurnOnSound();
            _soundMrg.btnSound();
        }

        UpdateUiForMusicButton();
    }
Exemplo n.º 12
0
 public static void Register()
 {
     DialogConfig.Init();
     EffectConfig.Init();
     GameBouquetsConfig.Init();
     GameDailyTaskConfig.Init();
     GameGuideConfig.Init();
     GameInitConfig.Init();
     GDailyTaskGiftConfig.Init();
     GuiConfig.Init();
     IPConfig.Init();
     LuckDrawConfig.Init();
     RepConfig.Init();
     RoleConfig.Init();
     SoundConfig.Init();
     StrConfig.Init();
     TalkConfig.Init();
 }
Exemplo n.º 13
0
    private void Awake()
    {
        if (instance == null)
        {
            music.Play();
            SetMusicTarget(1f);
            instance         = this;
            transform.parent = null;
            DontDestroyOnLoad(gameObject);

            for (int i = 0; i < soundInfo.Length; i++)
            {
                emitterDict.Add(soundInfo[i].type, soundInfo[i].eventEmitter);
            }
        }
        else
        {
            Destroy(gameObject);
        }
    }
Exemplo n.º 14
0
        /************************************************Unity方法与事件***********************************************/
        protected override void Start()
        {
            base.Start();

            videoPlayer.loopPointReached += (VideoPlayer source) =>
            {
                bMovieEnd = true;
            };

            BuglyUtil.Init();
            videoPlayer.Prepare();
            MissionConifg.LoadMissionConfig();
            propertyConfig.LoadPropertyConfig();
            TaskConifg.LoadTaskData();
            ItemConifg.LoadItemsConfig();
            TreasureBoxConfig.LoadTreasureBoxConfig();
            iconManager.OnlyLoadSelf();
            RoleConifg.LoadRoleConfig();
            LanConfig.LoadLanConfig();
            FontConfig.LoadFontConfig();
            I18NConfig.LoadResConfig();
            AccessoryConfig.LoadAccessoryConfig();
            AwardConfig.LoadAwardConfig();
            ActionConifg.LoadActionConfig();
            LevelConifg.LoadLevelConfig();
            SoundConfig.LoadSoundConfig();
            imageProgress.fillAmount = 0;
            GuLog.Debug("<><Preload>Load Begin!");
            StartCoroutine(StartLoading());
#if CLEAR_DATA
            LocalDataManager.getInstance().deleteAll();
#endif
            mHeartbearActionManager.addEventListener(mUploadFreindHeatbeatAction);
            mHeartbearActionManager.addEventListener(mUploadintakeHeatbeatAction);
            mHeartbeatManager.setHeartbeatListener(() =>
            {
                GuLog.Debug("Preload start do heart beat");
                mHeartbearActionManager.startHeartbeat();
            });
        }
Exemplo n.º 15
0
    public void PlaySceneSound(string sceneName, bool isPlay = true, bool isLoop = true)
    {
        OnAwakeIsPlay = isPlay;
        SoundIsLoop   = isLoop;
        SoundConfig cfg = Globals.Instance.MDataTableManager.GetConfig <SoundConfig>();

        _mSceneMusicElement = cfg.GetSceneMusicElement(sceneName);
        if (null == _mSceneMusicElement)
        {
            Debug.Log("The sceneName " + sceneName + " cann't find the music config.");
            return;
        }

        if (0 == _mSceneMusicElement.usableMusicList.Count)
        {
            Debug.Log("No have the background sound");
            return;
        }

        int index = Random.Range(0, _mSceneMusicElement.usableMusicList.Count);

        SoundConfig.MusicElement music = _mSceneMusicElement.usableMusicList[index];
        if (null == music)
        {
            return;
        }

        if (_mSceneMusic != null && "BGM_" + music.name == _mSceneMusic.name)
        {
            return;
        }


        // Stop all coroutines running on this behaviour
        StopAllCoroutines();

        PlaySceneBGMusic();
        PlaySceneSoundEffect();
    }
Exemplo n.º 16
0
        /// <summary>
        /// サウンドアセットをCriの成果物置き場からUnityの管理下にインポート.
        /// </summary>
        private static void UpdateSoundAssets(SoundConfig config, string scriptPath, string streamingAssetFolderName, string externalResourcesFolderName)
        {
            var criExportDir   = config.CriExportDir;
            var rootFolderName = config.RootFolderName;

            var assetExtensions = new string[] { CriAssetDefinition.AcbExtension, CriAssetDefinition.AwbExtension };

            var assetDirInternal = PathUtility.Combine(new string[] { UnityPathUtility.AssetsFolder, streamingAssetFolderName, rootFolderName });

            UpdateAcfAsset(config.AcfAssetSourceFullPath, config.AcfAssetExportPath);

            var updateScript = UpdateCriAssets(
                criExportDir, rootFolderName,
                streamingAssetFolderName, externalResourcesFolderName,
                assetExtensions
                );

            if (updateScript)
            {
                SoundScriptGenerator.Generate(scriptPath, assetDirInternal, rootFolderName);
            }
        }
Exemplo n.º 17
0
	public void Set (SoundConfig config)
	{   
		source = GetComponent<AudioSource> ();
		this.config = config;

		if (config.ifCircle) {
			interval = config.interval;
		
			source.loop = interval <= 0;
			StartCoroutine ("Circle");
			
		}

		volumeScale = config.volume;
		SetVolume ();
		if (config.limit > 0) {
			if (!playing.ContainsKey (config.id)) {
				playing.Add (config.id, new List<SoundPlayer> ());
			}

			playing [config.id].Add (this);
		}
	}
Exemplo n.º 18
0
    public void PlaySound(int soundID)
    {
        SoundConfig con = SoundConfig.GetConfig(soundID);

        if (con == null)
        {
            return;
        }

        SoundType type = (SoundType)con.type;

        switch (type)
        {
        case SoundType.BGM:
            BGMPlay(con.audioName);
            BGMSetVolume(con.volume);
            break;

        case SoundType.Audio:
            SoundPlay(con.audioName);
            break;
        }
    }
Exemplo n.º 19
0
 public void MergeFrom(StoryboardAdviceInterjectionStep other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CharacterPortraitImage.Length != 0)
     {
         CharacterPortraitImage = other.CharacterPortraitImage;
     }
     if (other.CharacterNameLockey.Length != 0)
     {
         CharacterNameLockey = other.CharacterNameLockey;
     }
     if (other.ContentTextLockey.Length != 0)
     {
         ContentTextLockey = other.ContentTextLockey;
     }
     if (other.ContentImageName.Length != 0)
     {
         ContentImageName = other.ContentImageName;
     }
     if (other.soundConfig_ != null)
     {
         if (soundConfig_ == null)
         {
             SoundConfig = new global::WUProtos.Data.SoundConfig();
         }
         SoundConfig.MergeFrom(other.SoundConfig);
     }
     if (other.ButtonLockey.Length != 0)
     {
         ButtonLockey = other.ButtonLockey;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo n.º 20
0
    private static void Add_Item(ReadStream rs)
    {
        int
            id =

            rs.ReadInt();



        string
            name =

            rs.ReadString();



        string
            audioName =

            rs.ReadString();



        int
            type =

            rs.ReadInt();



        int
            isLoop =

            rs.ReadInt();



        int
            playNum =

            rs.ReadInt();



        float
            volume =

            rs.ReadFloat();


        SoundConfig new_obj_SoundConfig = new SoundConfig(id, name, audioName, type, isLoop, playNum, volume);

        if (dic.ContainsKey(id))
        {
            LogWarning("duplicate key: " + id);
            return;
        }

        dic.Add(id, new_obj_SoundConfig);
        array.Add(new_obj_SoundConfig);
    }
Exemplo n.º 21
0
        public MedicalController(NativeOSWindow mainWindow)
        {
            //Create the log.
            logListener = new LogFileListener();
            logListener.openLogFile(MedicalConfig.LogFile);
            Log.Default.addLogListener(logListener);
            Log.ImportantInfo("Running from directory {0}", FolderFinder.ExecutableFolder);

            //Create pluginmanager
            pluginManager = new PluginManager(MedicalConfig.ConfigFile, services);

            //Configure the filesystem
            VirtualFileSystem archive = VirtualFileSystem.Instance;

            //Setup microcode cache load
            OgreInterface.MicrocodeCachePath      = Path.Combine(FolderFinder.LocalPrivateDataFolder, "ShaderCache.mcc");
            OgreInterface.AllowMicrocodeCacheLoad = MedicalConfig.LastShaderVersion == UnifiedMaterialBuilder.Version;
            OgreInterface.TrackMemoryLeaks        = MedicalConfig.TrackMemoryLeaks;
            MedicalConfig.LastShaderVersion       = UnifiedMaterialBuilder.Version;

            MyGUIInterface.EventLayerKey     = EventLayers.Gui;
            MyGUIInterface.CreateGuiGestures = MedicalConfig.EnableMultitouch && PlatformConfig.TouchType == TouchType.Screen;
            MyGUIInterface.TrackMemoryLeaks  = MedicalConfig.TrackMemoryLeaks;

            RuntimePlatformInfo.addPath(MedicalConfig.OpenGLESEmulatorPath);

            //Configure plugins
            pluginManager.OnConfigureDefaultWindow = delegate(out WindowInfo defaultWindow)
            {
                //Setup main window
                defaultWindow              = new WindowInfo(mainWindow, "Primary");
                defaultWindow.Fullscreen   = MedicalConfig.EngineConfig.Fullscreen;
                defaultWindow.MonitorIndex = 0;

                if (MedicalConfig.EngineConfig.Fullscreen)
                {
                    mainWindow.setSize(MedicalConfig.EngineConfig.HorizontalRes, MedicalConfig.EngineConfig.VerticalRes);
                    mainWindow.ExclusiveFullscreen = true;
                    defaultWindow.Width            = MedicalConfig.EngineConfig.HorizontalRes;
                    defaultWindow.Height           = MedicalConfig.EngineConfig.VerticalRes;
                }
                else
                {
                    mainWindow.Maximized = true;
                }
                mainWindow.show();
            };

            GuiFrameworkCamerasInterface.CameraTransitionTime   = MedicalConfig.CameraTransitionTime;
            GuiFrameworkCamerasInterface.DefaultCameraButton    = MedicalConfig.CameraMouseButton;
            GuiFrameworkCamerasInterface.MoveCameraEventLayer   = EventLayers.Cameras;
            GuiFrameworkCamerasInterface.SelectWindowEventLayer = EventLayers.AfterGui;
            GuiFrameworkCamerasInterface.ShortcutEventLayer     = EventLayers.Gui;
            GuiFrameworkCamerasInterface.TouchType = PlatformConfig.TouchType;
            GuiFrameworkCamerasInterface.PanKey    = PlatformConfig.PanKey;

            GuiFrameworkEditorInterface.ToolsEventLayers = EventLayers.Tools;

            pluginManager.addPluginAssembly(typeof(OgreInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(BulletInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(NativePlatformPlugin).Assembly);
            pluginManager.addPluginAssembly(typeof(MyGUIInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(RocketInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(SoundPluginInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(BEPUikInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(SimulationPlugin).Assembly);
            pluginManager.addPluginAssembly(typeof(GuiFrameworkInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(RocketWidgetInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(GuiFrameworkCamerasInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(GuiFrameworkEditorInterface).Assembly);
            pluginManager.addPluginAssembly(typeof(GuiFrameworkDebuggingInterface).Assembly);
            pluginManager.initializePlugins();

            performanceMetricTimer = new NativeSystemTimer();
            PerformanceMonitor.setupEnabledState(performanceMetricTimer);

            //Intialize the platform
            BulletInterface.Instance.ShapeMargin = 0.005f;
            systemTimer = new NativeSystemTimer();

            mainTimer = new NativeUpdateTimer(systemTimer);

            if (OgreConfig.VSync && MedicalConfig.EngineConfig.FPSCap < 300)
            {
                //Use a really high framerate cap if vsync is on since it will cap our
                //framerate for us. If the user has requested a higher rate use it anyway.
                mainTimer.FramerateCap = 300;
            }
            else
            {
                mainTimer.FramerateCap = MedicalConfig.EngineConfig.FPSCap;
            }

            inputHandler = new NativeInputHandler(mainWindow, MedicalConfig.EnableMultitouch);
            eventManager = new EventManager(inputHandler, Enum.GetValues(typeof(EventLayers)));
            eventUpdate  = new EventUpdateListener(eventManager);
            mainTimer.addUpdateListener(eventUpdate);
            pluginManager.setPlatformInfo(mainTimer, eventManager);
            medicalUpdate = new MedicalUpdate(this);
            mainTimer.addUpdateListener(medicalUpdate);

            //Initialize controllers
            medicalScene      = new MedicalSceneController(pluginManager);
            frameClearManager = new FrameClearManager(OgreInterface.Instance.OgrePrimaryWindow.OgreRenderTarget);

            SoundConfig.initialize(MedicalConfig.ConfigFile);

            GuiFrameworkInterface.Instance.handleCursors(mainWindow);
            SoundPluginInterface.Instance.setResourceWindow(mainWindow);

            TouchMouseGuiForwarder = new TouchMouseGuiForwarder(eventManager, inputHandler, systemTimer, mainWindow, EventLayers.Last);
            TouchMouseGuiForwarder.ForwardTouchesAsMouse = PlatformConfig.ForwardTouchAsMouse;
            var myGuiKeyboard  = new MyGUIOnscreenKeyboardManager(TouchMouseGuiForwarder);
            var rocketKeyboard = new RocketWidgetOnscreenKeyboardManager(TouchMouseGuiForwarder);
        }
Exemplo n.º 22
0
 void Awake()
 {
     m_SoundConfig = this;
     LoadXml();
 }
Exemplo n.º 23
0
        private void BuildPluginManager()
        {
            mainWindow = new NativeOSWindow(startup.Title,
                                            new IntVector2(-1, -1),
                                            new IntSize2(CoreConfig.EngineConfig.HorizontalRes, CoreConfig.EngineConfig.VerticalRes));

            services.TryAddSingleton <OSWindow>(mainWindow);       //This is externally owned
            services.TryAddSingleton <NativeOSWindow>(mainWindow); //This is externally owned

            mainWindow.Closed += w =>
            {
                if (PlatformConfig.CloseMainWindowOnShutdown)
                {
                    mainWindow.close();
                }
                this.exit();
            };

            //Setup DPI
            float pixelScale = mainWindow.WindowScaling;

            switch (CoreConfig.ExtraScaling)
            {
            case UIExtraScale.Smaller:
                pixelScale -= .15f;
                break;

            case UIExtraScale.Larger:
                pixelScale += .25f;
                break;
            }

            ScaleHelper._setScaleFactor(pixelScale);

            pluginManager = new PluginManager(CoreConfig.ConfigFile, services);

            services.TryAddSingleton <SystemTimer, NativeSystemTimer>();

            services.TryAddSingleton <UpdateTimer, NativeUpdateTimer>();

            services.TryAddSingleton <InputHandler>(s =>
            {
                return(new NativeInputHandler(s.GetRequiredService <NativeOSWindow>(), CoreConfig.EnableMultitouch));
            });

            services.TryAddSingleton <EventManager>(s =>
            {
                return(new EventManager(s.GetRequiredService <InputHandler>(), Enum.GetValues(typeof(EventLayers))));
            });

            MyGUIInterface.EventLayerKey     = EventLayers.Gui;
            MyGUIInterface.CreateGuiGestures = CoreConfig.EnableMultitouch && PlatformConfig.TouchType == TouchType.Screen;

            OgreInterface.CompressedTextureSupport = CompressedTextureSupport.None;
            OgreInterface.TrackMemoryLeaks         = true;

            //Configure plugins
            pluginManager.OnConfigureDefaultWindow = delegate(out WindowInfo defaultWindow)
            {
                //Setup main window
                defaultWindow              = new WindowInfo(mainWindow, "Primary");
                defaultWindow.Fullscreen   = CoreConfig.EngineConfig.Fullscreen;
                defaultWindow.MonitorIndex = 0;

                if (CoreConfig.EngineConfig.Fullscreen)
                {
                    mainWindow.setSize(CoreConfig.EngineConfig.HorizontalRes, CoreConfig.EngineConfig.VerticalRes);
                    mainWindow.ExclusiveFullscreen = true;
                    defaultWindow.Width            = CoreConfig.EngineConfig.HorizontalRes;
                    defaultWindow.Height           = CoreConfig.EngineConfig.VerticalRes;
                }
                else
                {
                    mainWindow.Maximized = true;
                }
                mainWindow.show();
            };

            //GuiFrameworkCamerasInterface.CameraTransitionTime = MedicalConfig.CameraTransitionTime;
            //GuiFrameworkCamerasInterface.DefaultCameraButton = MedicalConfig.CameraMouseButton;
            GuiFrameworkCamerasInterface.MoveCameraEventLayer   = EventLayers.Cameras;
            GuiFrameworkCamerasInterface.SelectWindowEventLayer = EventLayers.AfterGui;
            GuiFrameworkCamerasInterface.ShortcutEventLayer     = EventLayers.AfterGui;
            GuiFrameworkCamerasInterface.TouchType = PlatformConfig.TouchType;
            GuiFrameworkCamerasInterface.PanKey    = PlatformConfig.PanKey;

            pluginManager.addPluginAssembly(typeof(OgreInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(BulletInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(NativePlatformPlugin).Assembly());
            pluginManager.addPluginAssembly(typeof(MyGUIInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(RocketInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(SoundPluginInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(GuiFrameworkInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(RocketWidgetInterface).Assembly());
            pluginManager.addPluginAssembly(typeof(GuiFrameworkCamerasInterface).Assembly());
            foreach (var assembly in startup.AdditionalPluginAssemblies)
            {
                pluginManager.addPluginAssembly(assembly);
            }
            pluginManager.initializePlugins();

            var scope = pluginManager.GlobalScope;

            var systemTimer  = scope.ServiceProvider.GetRequiredService <SystemTimer>();
            var mainTimer    = scope.ServiceProvider.GetRequiredService <UpdateTimer>();
            var inputHandler = this.InputHandler = scope.ServiceProvider.GetRequiredService <InputHandler>();
            var eventManager = scope.ServiceProvider.GetRequiredService <EventManager>();

            //Intialize the platform
            BulletInterface.Instance.ShapeMargin = 0.005f;

            //Setup framerate cap
            if (PlatformConfig.FpsCap.HasValue)
            {
                //Use platform cap if it is set always
                mainTimer.FramerateCap = PlatformConfig.FpsCap.Value;
            }
            else if (OgreConfig.VSync)
            {
                //Use a unlimited framerate cap if vsync is on since it will cap our
                //framerate for us. If the user has requested a higher rate use it anyway.
                mainTimer.FramerateCap = 0;
            }
            else
            {
                //Otherwise config cap
                mainTimer.FramerateCap = CoreConfig.EngineConfig.FPSCap;
            }

            mainTimer.addUpdateListener(new EventUpdateListener(eventManager));

            pluginManager.setPlatformInfo(mainTimer, eventManager);

            GuiFrameworkInterface.Instance.handleCursors(mainWindow);

            SoundConfig.initialize(CoreConfig.ConfigFile);

            GuiFrameworkInterface.Instance.handleCursors(mainWindow);
            SoundPluginInterface.Instance.setResourceWindow(mainWindow);

            var touchMouseGuiForwarder = new TouchMouseGuiForwarder(eventManager, inputHandler, systemTimer, mainWindow, EventLayers.Last);

            touchMouseGuiForwarder.ForwardTouchesAsMouse = PlatformConfig.ForwardTouchAsMouse;
            var myGuiKeyboard  = new MyGUIOnscreenKeyboardManager(touchMouseGuiForwarder);
            var rocketKeyboard = new RocketWidgetOnscreenKeyboardManager(touchMouseGuiForwarder);
        }
Exemplo n.º 24
0
 static void Copy()
 {
     string        spath         = @"F:\voyager\UnityPackages\Assets\Configuration\Sound.xml";
     var           sconfig       = new SoundConfig();
     XmlSerializer xmlSerializer = new XmlSerializer(sconfig.GetType());
 }