Add start of ship editing

This commit is contained in:
asraelite 2018-03-04 16:49:42 +00:00
parent d85338d9f2
commit b88c0eb358
18 changed files with 288 additions and 100 deletions

View file

@ -11,10 +11,11 @@ export class Rect {
this.mouseHeld = false;
}
click() {}
tickMouse() {
if (this.mouseHeld == true && !input.mouse.held[0] && this.mouseOver)
if (this.onclick !== null)
this.onclick();
this.click();
if (!this.mouseHeld && input.mouse.pressed[0] && this.mouseOver)
this.mouseHeld = true;
if (!input.mouse.held[0])