Add Input

This commit is contained in:
2025-07-27 19:03:57 +02:00
parent 299b55429c
commit 1578c01bab

View File

@@ -9,7 +9,8 @@ package Game {
}
class Level {
+ name: String
+ gameObjects[]: gameObject
+ gameObjects[]: GameObject
+ inputs[]: Input
+ load()
+ start()
+ draw()
@@ -23,6 +24,7 @@ package Game {
+ y: double
+ width: double
+ height: double
+ rotation: double
+ img: Image
+ layer: int
+ load()
@@ -31,6 +33,12 @@ package Game {
+ draw()
+ update()
}
class Input {
+ key: String
+ type: String
+ listen()
+ action()
}
}
package Frontend {
@@ -53,6 +61,7 @@ json MainGameJSON{
"Y":0,
"Width":100,
"Height":100,
"Rotation":90,
"imgSRC":"Image",
"layer":1