public EndTile() { render = new RenderComponent("", "", "Level/signExit"); var dimensions = render.GetDimensions(); this.CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, (int)dimensions.X, (int)dimensions.Y); }
public Blok(Vector2 position) { render = new RenderComponent("", "", "Level/grassCenter"); this.Position = position; var dimensions = render.GetDimensions(); this.CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, (int)dimensions.X, (int)dimensions.Y); }
public Player(IInputReader inputReader) { this.inputReader = inputReader; render = new RenderComponent("playerWalk", "playerJump", "player", 30, 11); entityState = Enums.EntityState.idle; Health = 1; canJump = true; var dimensions = render.GetDimensions(); this.CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, (int)dimensions.X, (int)dimensions.Y); _colRect = CollisionRectangle; }
public void UpdateRect() { var dimensions = render.GetDimensions(); this.CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, (int)dimensions.X, (int)dimensions.Y); }