feat(pbs): align typed values and Pad input facade
Test / Build occurred while executing withChecks step.
Intrepid/Prometeu/Studio/pipeline/pr-master There was a failure building this commit
Intrepid/Prometeu/Studio/pipeline/head There was a failure building this commit

This commit is contained in:
2026-10-15 15:48:50 +01:00
parent 603ed01227
commit 13c0ababbb
48 changed files with 1251 additions and 354 deletions
+7 -9
View File
@@ -1,5 +1,5 @@
import { Log } from @sdk:log;
import { Input } from @sdk:input;
import { Pad, Button, Touch } from @sdk:input;
import { Composer } from @sdk:composer;
import { Gfx } from @sdk:gfx;
import { Assets } from @sdk:asset;
@@ -56,16 +56,14 @@ fn frame() -> void
}
}
let touch : InputTouch = Input.touch();
let pad : InputPad = Input.pad();
if (touch.button().released())
if (Touch.released())
{
frame_counter = 0;
tile_id = 0;
}
if (touch.button().down())
if (Touch.down())
{
frame_counter = frame_counter + 1;
if (frame_counter > MAX_FRAMES)
@@ -87,21 +85,21 @@ fn frame() -> void
Log.info("camera_x:" + camera_x);
Composer.set_camera(camera_x, 0);
Composer.emit_sprite(tile_id, 0, touch.x() - 16, touch.y() + 8, 2, 0, true, false, 0);
Composer.emit_sprite(tile_id, 0, (Touch.x() as int) - 16, (Touch.y() as int) + 8, 2, 0, true, false, 0);
let a : int = 10;
let b : int = 15;
let total : int = a + b;
if (pad.a().pressed())
if (Pad.pressed(Button.A))
{
total += 25;
}
else if (pad.b().pressed())
else if (Pad.pressed(Button.B))
{
total += 5;
}
else if (pad.x().pressed())
else if (Pad.pressed(Button.X))
{
total -= 10;
}