From b57ae5d5888ba7ed2ee96c62f52803bff4b2e960 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 28 Nov 2017 15:33:43 -0800 Subject: [PATCH] implement wasPressed --- libs/core/buttons.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/core/buttons.ts b/libs/core/buttons.ts index 22f73721..2e04f419 100644 --- a/libs/core/buttons.ts +++ b/libs/core/buttons.ts @@ -68,6 +68,7 @@ namespace brick { _update(curr: boolean) { if (this._isPressed == curr) return this._isPressed = curr + if (curr) this._wasPressed = true; if (curr) { this.downTime = control.millis() control.raiseEvent(this._id, ButtonEvent.Down)