Ejemplo n.º 1
0
        public void Setup()
        {
            _components = IoCManager.Resolve <IComponentFactory>();
            _components.RegisterClass <HotReloadTestComponentOne>();
            _components.RegisterClass <HotReloadTestComponentTwo>();

            IoCManager.Resolve <ISerializationManager>().Initialize();
            _prototypes = (PrototypeManager)IoCManager.Resolve <IPrototypeManager>();
            _prototypes.LoadString(InitialPrototypes);
            _prototypes.Resync();

            _maps     = IoCManager.Resolve <IMapManager>();
            _entities = IoCManager.Resolve <IEntityManager>();
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _components = IoCManager.Resolve <IComponentFactory>();
            _components.RegisterClass <HotReloadTestOneComponent>();
            _components.RegisterClass <HotReloadTestTwoComponent>();
            _components.GenerateNetIds();

            IoCManager.Resolve <ISerializationManager>().Initialize();
            _prototypes = (PrototypeManager)IoCManager.Resolve <IPrototypeManager>();
            _prototypes.RegisterType(typeof(EntityPrototype));
            _prototypes.LoadString(InitialPrototypes);
            _prototypes.Resync();

            _maps     = IoCManager.Resolve <IMapManager>();
            _entities = IoCManager.Resolve <IEntityManager>();
        }
        public void Setup()
        {
            _componentFactory = IoCManager.Resolve <IComponentFactory>();

            _componentFactory.RegisterClass <ThrowsInAddComponent>();
            _componentFactory.RegisterClass <ThrowsInInitializeComponent>();
            _componentFactory.RegisterClass <ThrowsInStartupComponent>();

            EntityManager = IoCManager.Resolve <IServerEntityManager>();
            MapManager    = IoCManager.Resolve <IMapManager>();

            MapManager.CreateNewMapEntity(MapId.Nullspace);

            IoCManager.Resolve <ISerializationManager>().Initialize();
            var manager = IoCManager.Resolve <IPrototypeManager>();

            manager.LoadFromStream(new StringReader(PROTOTYPES));
            manager.Resync();

            //NOTE: The grids have not moved, so we can assert worldpos == localpos for the test
        }
Ejemplo n.º 4
0
        public void OneTimeSetup()
        {
            _taskManager = IoCManager.Resolve <ITaskManager>();
            _taskManager.Initialize();
            IComponentFactory componentFactory = IoCManager.Resolve <IComponentFactory>();

            componentFactory.RegisterClass <DMISpriteComponent>();
            componentFactory.GenerateNetIds();
            _dreamMan = IoCManager.Resolve <IDreamManager>();
            Compile(InitializeEnvironment);
            _dreamMan.Initialize(Path.ChangeExtension(InitializeEnvironment, "json"));
        }