Ejemplo n.º 1
0
        public void AddPlayer()
        {
            var entityRenderer = new PlayerEntityRenderer(_content, _expiringSpatialHash, PlayerEntity.Instance, _tileSize.ToPoint());

            _expiringSpatialHash.AddNode(PlayerEntity.Instance.Position.ToPoint(), PlayerEntity.Instance);
            RenderList.Add(entityRenderer);
            EntityRenderersDict[PlayerEntity.Instance] = entityRenderer;
            _spatialHashMover.Add(PlayerEntity.Instance);
        }
Ejemplo n.º 2
0
 public void Add(T character)
 {
     _characterList.Add(character);
     _spatialHashLayer.AddNode(character.Position.ToPoint(), character);
 }