Esempio n. 1
0
        public Player(ISpatialDictionary <IPlayer> playerSpatialMap,
                      ISpatialDictionary <INpc> npcSpatialMap,
                      ISpatialDictionary <IGameObject> objSpatialMap,
                      IWorld world)
        {
            Debug.Assert(playerSpatialMap != null);
            Debug.Assert(npcSpatialMap != null);
            Debug.Assert(objSpatialMap != null);
            Debug.Assert(world != null);

            _playerSpatialMap = playerSpatialMap;
            _npcSpatialMap    = npcSpatialMap;
            _objectSpatialMap = objSpatialMap;
            _world            = world;
        }
Esempio n. 2
0
        public World(ISpatialDictionary <IPlayer> playerSpatialMap,
                     ISpatialDictionary <INpc> npcSpatialMap,
                     ISpatialDictionary <IGameObject> objSpatialMap)
        {
            Debug.Assert(playerSpatialMap != null);
            Debug.Assert(npcSpatialMap != null);
            Debug.Assert(objSpatialMap != null);

            _playerSpatialMap = playerSpatialMap;
            _npcSpatialMap    = npcSpatialMap;
            _objectSpatialMap = objSpatialMap;

            DoorDefs = DataLoader.GetDoorDefinitions();
            TileDefs = DataLoader.GetTileDefinitions();

            InitialiseWorldTileData();
        }
Esempio n. 3
0
        public Npc(ISpatialDictionary <INpc> npcSpatialMap)
        {
            Debug.Assert(npcSpatialMap != null);

            _npcSpatialMap = npcSpatialMap;
        }
        public GameObject(ISpatialDictionary <IGameObject> objSpatialMap)
        {
            Debug.Assert(objSpatialMap != null);

            _gameObjectSpatialMap = objSpatialMap;
        }