aritmetics
This commit is contained in:
@@ -3,8 +3,29 @@ import { Input } from @sdk:input;
|
||||
|
||||
fn frame() -> void
|
||||
{
|
||||
let a = 10;
|
||||
let b = 15;
|
||||
let total = a + b;
|
||||
|
||||
if (Input.pad().a().pressed())
|
||||
{
|
||||
Log.debug("Hello World!");
|
||||
total += 25;
|
||||
}
|
||||
}
|
||||
else if (Input.pad().b().pressed())
|
||||
{
|
||||
total += 5;
|
||||
}
|
||||
|
||||
if (total == 30)
|
||||
{
|
||||
Log.info("30 is the magic number!");
|
||||
}
|
||||
else if (total == 50)
|
||||
{
|
||||
Log.error("50 is the magic number!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.warn("The magic number is neither 30 nor 50!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user