EngineSystemReference(bool dummy)
        {
            Util.MarkUnusedVariable(ref dummy);

            mSystem      = null;
            mBuildHandle = EngineBuildHandle.None;
        }
Esempio n. 2
0
        public void Dispose()
        {
            if (mSystem != null)
            {
#pragma warning disable 4014
                mSystem.RemoveReferenceAsync(mBuildHandle);
#pragma warning restore 4014
                mSystem = null;
            }
        }
Esempio n. 3
0
        internal EngineSystemReference(EngineSystemBase system, EngineBuildHandle buildHandle)
        {
            Contract.Assume(system != null);
            Contract.Assume(!buildHandle.IsNone);

            mSystem      = system;
            mBuildHandle = buildHandle;

#pragma warning disable 4014
            system.AddReferenceAsync(buildHandle);
#pragma warning restore 4014
        }
Esempio n. 4
0
        /// <summary>Only call me if you are <see cref="EngineSystemBase.RemoveReferenceAsync"/></summary>
        /// <param name="activeSystem">The system which no longer has any active references</param>
        internal void CloseSystem(EngineSystemBase activeSystem)
        {
            Contract.Assume(activeSystem != null);

            var system_guid = activeSystem.Prototype.SystemMetadata.SystemGuid;

            lock (mActiveSystems)
            {
                Contract.Assume(mActiveSystems.ContainsKey(system_guid));
                mActiveSystems.Remove(system_guid);
            }
        }
Esempio n. 5
0
 EngineSystemReference(bool dummy)
 {
     mSystem      = null;
     mBuildHandle = EngineBuildHandle.None;
 }