2024-04-11 23:03:39 +00:00
|
|
|
package component:witguest;
|
|
|
|
|
2024-04-12 06:05:10 +00:00
|
|
|
interface math {
|
|
|
|
record vec3 {
|
|
|
|
x: f32,
|
|
|
|
y: f32,
|
|
|
|
z: f32,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-11 23:03:39 +00:00
|
|
|
/// An example world for the component to target.
|
|
|
|
world example {
|
2024-04-12 06:05:10 +00:00
|
|
|
import math;
|
2024-07-27 19:24:14 +00:00
|
|
|
use lyra:api/ecs.{ecs-world, entity};
|
2024-04-12 06:05:10 +00:00
|
|
|
|
|
|
|
import host-print: func(msg: string);
|
2024-07-27 19:24:14 +00:00
|
|
|
|
|
|
|
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;
|
2024-04-11 23:03:39 +00:00
|
|
|
}
|