public CanvasCharacterRenderer(Character character) { Character = character; RenderPosition = new Rectangle(-1, -1, 0, 0); RenderRotation = 0; }
public static void Initialize() { PrepareTheBody(); CreateCanvasElement(); WindowRenderSize = new Rectangle(0, 0, HtmlContext.window.innerWidth, HtmlContext.window.innerHeight); _playerImage = new HtmlImageElement(); _playerImage.src = "res/Square.gif"; //HtmlContext.document.body.appendChild(_playerImage); _characterRenderers = new List<CanvasCharacterRenderer>(); Resize(); }
static ClientRenderer() { StageTileSize = new Rectangle(0, 0, 40, 40); WindowRenderSize = new Rectangle(0, 0, 1920, 1080); }
public bool Contains(Rectangle rect) { if (rect.Right < this.X || rect.X > this.Right || rect.Y > this.Top || rect.Top < this.Y) { return false; } return true; }