示例#1
0
        // Destroys Phonon Manager.
        public void Destroy()
        {
            --referenceCount;

            if (referenceCount == 0)
            {
                if (audioEngineState != null)
                {
                    audioEngineState.Destroy();
                    audioEngineState = null;
                }

                gameEngineState.Destroy();
                componentCache.Destroy();
            }
        }
示例#2
0
        public void Initialize(GameEngineStateInitReason reason, AudioEngine audioEngine, SimulationSettingsValue simulationValue, string[] sofaFileNames)
        {
            if (referenceCount == 0)
            {
                componentCache.Initialize();
                gameEngineState.Initialize(simulationValue, componentCache, reason);

                if (reason == GameEngineStateInitReason.Playing)
                {
                    audioEngineState = AudioEngineStateFactory.Create(audioEngine);
                    audioEngineState.Initialize(componentCache, gameEngineState, sofaFileNames);
                }
            }

            ++referenceCount;
        }