コード例 #1
0
        public void Setup()
        {
            var compMan = IoCManager.Resolve <IComponentManager>();

            compMan.Initialize();

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

            MapManager.CreateMap();

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

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

            // build the net dream
            MapA  = MapManager.CreateMap();
            GridA = MapManager.CreateGrid(MapA);

            MapB  = MapManager.CreateMap();
            GridB = MapManager.CreateGrid(MapB);

            //NOTE: The grids have not moved, so we can assert worldpos == localpos for the test
        }
コード例 #2
0
        public void Setup()
        {
            _componentFactory = IoCManager.Resolve <IComponentFactory>();

            _componentFactory.Register <ThrowsInAddComponent>();
            _componentFactory.Register <ThrowsInExposeDataComponent>();
            _componentFactory.Register <ThrowsInInitializeComponent>();
            _componentFactory.Register <ThrowsInStartupComponent>();

            var compMan = IoCManager.Resolve <IComponentManager>();

            compMan.Initialize();

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

            MapManager.CreateNewMapEntity(MapId.Nullspace);

            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
        }
コード例 #3
0
        public void Setup()
        {
            EntityManager = IoCManager.Resolve <IServerEntityManager>();

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

            manager.LoadFromStream(new StringReader(PROTOTYPES));
            manager.Resync();
        }
コード例 #4
0
        public void Setup()
        {
            var compMan = IoCManager.Resolve <IComponentManager>();

            compMan.Initialize();
            EntityManager = IoCManager.Resolve <IServerEntityManager>();

            var mapManager = IoCManager.Resolve <IMapManager>();

            mapManager.Initialize();
            mapManager.Startup();

            mapManager.CreateMap();

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

            manager.LoadFromStream(new StringReader(PROTOTYPES));
            manager.Resync();
        }
コード例 #5
0
        public void Setup()
        {
            EntityManager = IoCManager.Resolve <IServerEntityManager>();
            MapManager    = IoCManager.Resolve <IMapManager>();

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

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

            // build the net dream
            var newMap = MapManager.CreateMap(new MapId(1));

            newMap.CreateGrid(new GridId(4));

            newMap = MapManager.CreateMap(new MapId(2));
            newMap.CreateGrid(new GridId(5));

            //NOTE: The grids have not moved, so we can assert worldpos == localpos for the test
        }
コード例 #6
0
 /// <summary>
 ///     Creates an instance of this LogicProcessor.
 /// </summary>
 public AimShootLifeProcessor()
 {
     _physMan = IoCManager.Resolve <ICollisionManager>();
     _entMan  = IoCManager.Resolve <IServerEntityManager>();
     _timeMan = IoCManager.Resolve <IGameTiming>();
 }
コード例 #7
0
 public PlayerManager()
 {
     entityManager  = IoCManager.Resolve <IServerEntityManager>();
     playerSessions = new Dictionary <int, PlayerSession>();
     //We can actually query this by client connection or whatever we want using linq
 }
コード例 #8
0
 /// <summary>
 /// Constructs an instance of the player manager.
 /// </summary>
 public PlayerManager()
 {
     _entityManager = IoCManager.Resolve <IServerEntityManager>();
     _sessions      = new Dictionary <int, PlayerSession>();
 }