21 lines
474 B
Plaintext
21 lines
474 B
Plaintext
|
package component:witguest;
|
||
|
|
||
|
interface math {
|
||
|
record vec3 {
|
||
|
x: f32,
|
||
|
y: f32,
|
||
|
z: f32,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// An example world for the component to target.
|
||
|
world example {
|
||
|
import math;
|
||
|
use lyra:api/ecs.{ecs-world, entity};
|
||
|
|
||
|
import host-print: func(msg: string);
|
||
|
|
||
|
export on-init: func(game-world: borrow<ecs-world>, owning-entity: entity) -> result;
|
||
|
export on-update: func(game-world: borrow<ecs-world>, owning-entity: entity) -> result;
|
||
|
}
|