sdk executable service bodies
This commit is contained in:
+17
-2
@@ -1,5 +1,5 @@
|
||||
[BuiltinType(name = "input", version = 1)]
|
||||
declare builtin type Input() {
|
||||
declare builtin type InputType() {
|
||||
[IntrinsicCall(name = "pad", version = 1)]
|
||||
fn pad() -> InputPad;
|
||||
|
||||
@@ -74,4 +74,19 @@ declare builtin type InputButton() {
|
||||
}
|
||||
|
||||
[BuiltinConst(target = "input", name = "global", version = 1)]
|
||||
declare const Input: Input;
|
||||
declare const LowInput: InputType;
|
||||
|
||||
declare service Input
|
||||
{
|
||||
fn pad() -> InputPad
|
||||
{
|
||||
let pad = LowInput.pad();
|
||||
return pad;
|
||||
}
|
||||
|
||||
fn touch() -> InputTouch
|
||||
{
|
||||
let touch = LowInput.touch();
|
||||
return touch;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
pub struct Input;
|
||||
pub struct InputPad;
|
||||
pub struct InputTouch;
|
||||
pub struct InputButton;
|
||||
pub const Input;
|
||||
pub service Input;
|
||||
|
||||
Reference in New Issue
Block a user