import "fpkit: system/interactive.modifier.api" for API, Modifier, APIGet, APISet, Wire, Fields, State, Op import "luxe: io" for IO import "luxe: assets" for Assets, Strings import "luxe: world" for Entity, World import "luxe.project/asset" for Asset #block = data class Data { //add data fields here } #api #display = "FPKit Interactive" #desc = "**Receives Interaction signals**. Has signals to tap into with your own modifiers when the player looks at or uses this Entity." #icon = "luxe: image/modifier/modifier.svg" class Interactive is API { static begin_look(entity: Entity) { } static end_look(entity: Entity) {} static begin_interact(entity: Entity) { Log.print("Interact Begin!") } static end_interact(entity: Entity) { Log.print("Interact End!") } } #system #phase(on, tick) class System is Modifier { //required atm construct new(world: World) { super(world) } init(world: World) { Log.print("init `%(This)` in world `%(world)`") } #hidden attach(entity: Entity, data: Data) { Log.print("attached to `%(Entity.name(entity))` `%(entity)` - `%(This)`") } #hidden detach(entity: Entity, data: Data) { Log.print("detached from `%(Entity.name(entity))` `%(entity)` - `%(This)`") } #hidden tick(delta: Num) { // each {|entity: Entity, data: Data| // } } }