Esempio n. 1
0
        //State Initialization =>
        //Add Loading screen animation, and ServerComponent
        public override void Initialize(SharpDX.Direct3D11.DeviceContext context)
        {
            if (PreviousGameState != this)
            {
                GameComponents.Clear();
            }

            var loading = _ioc.Get <LoadingComponent>();

            _vars = _ioc.Get <RealmRuntimeVariables>();

            AddComponent(loading); //Will "Mask" the Components being loaded.
            AddComponent(_ioc.Get <ServerComponent>());
            AddComponent(_ioc.Get <GuiManager>());

            base.Initialize(context);
        }
Esempio n. 2
0
 protected override void Dispose(bool disposing)
 {
     GameComponents.Clear();
     base.Dispose(disposing);
 }
Esempio n. 3
0
 public void ResetGame()
 {
     SyncedGameCollection.ComponentCollection.Clear();
     world.Clear();
     GameComponents.Clear();
 }