public bool Collides(Vector2D hitterPosition) { Vector2D worldPosition = CoordinateSystemConverter.PixelsToWorld(hitterPosition); LayeredWorld world = (LayeredWorld)WorldManager.Worlds["first_world"]; return(world.Collides(worldPosition, 0)); }
private bool Collides(Direction direction) { if (world is LayeredWorld) { LayeredWorld lworld = (LayeredWorld)world; lworld.Layer = collisionLayer; return(lworld.CollidesWith(this, direction)); } return(world.CollidesWith(this)); }
public void Initialize() { world = (LayeredWorld)WorldManager.Worlds["first_world"]; view = new View(new Vector2f(100, 0), new Vector2f(50, 50)); view.Zoom(10); player = new Player(world.PlayerStartPosition); Program.RenderWindow.KeyPressed += RenderWindow_KeyPressed; }
public void Initialize() { world = (LayeredWorld)WorldManager.GetWorld("grassland"); player = new SecondPlayer(world); }