fix services and add logs
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
import { Color, Gfx } from "@sdk:gfx";
|
||||
import { Pad, Touch } from "@sdk:input";
|
||||
import { Log } from "@sdk:log";
|
||||
|
||||
declare struct Vec2(x: int, y: int)
|
||||
[
|
||||
@@ -51,10 +52,14 @@ fn frame(): void {
|
||||
}
|
||||
|
||||
// 4. Input Snapshot & Nested Member Access
|
||||
let pad = Pad.a();
|
||||
let touch = Touch.finger();
|
||||
let is_pressed = pad.down || touch.down;
|
||||
let pad_a = Pad.a();
|
||||
let touch_f = Touch.finger();
|
||||
let is_pressed = pad_a.down || touch_f.down;
|
||||
if is_pressed {
|
||||
Gfx.clear(Color.BLUE);
|
||||
}
|
||||
|
||||
if Pad.b().pressed {
|
||||
Log.debug("B Pressed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user