2024-11-07 02:26:03 +00:00
|
|
|
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;
|
2024-11-12 23:57:46 +00:00
|
|
|
import lyra:api/asset;
|
2024-11-07 02:26:03 +00:00
|
|
|
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;
|
|
|
|
}
|