public CanvasCharacterRenderer(Character character)
        {
            Character = character;

            RenderPosition = new Rectangle(-1, -1, 0, 0);

            RenderRotation = 0;
        }
예제 #2
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();
        }
예제 #3
0
        static ClientRenderer()
        {
            StageTileSize = new Rectangle(0, 0, 40, 40);

            WindowRenderSize = new Rectangle(0, 0, 1920, 1080);
        }
예제 #4
0
        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;
        }