bright-gpu-74537
04/23/2023, 8:34 PMambitious-knife-25690
04/23/2023, 8:34 PMbright-gpu-74537
04/23/2023, 8:34 PM#if hscript
is pretty valid, ie, you include the scripting lang, so you get access to a runtime scripted css functionambitious-knife-25690
04/23/2023, 8:35 PMambitious-knife-25690
04/23/2023, 8:35 PMambitious-knife-25690
04/23/2023, 8:35 PMbright-gpu-74537
04/23/2023, 8:36 PM/** A list of haxe libraryes required to make ceramic runtime work */
ambitious-knife-25690
04/23/2023, 8:36 PMbright-gpu-74537
04/23/2023, 8:41 PMbright-gpu-74537
04/23/2023, 8:41 PMhaxe
#if hscript
throw "we dont allow hscript in our libs";
#end
billowy-waiter-28954
04/23/2023, 9:11 PMfaint-toothbrush-51643
04/24/2023, 3:26 AMbillowy-waiter-28954
04/24/2023, 7:15 AMstraight-twilight-37046
04/24/2023, 8:32 PMbland-apple-47181
04/25/2023, 9:00 PMbland-apple-47181
04/25/2023, 9:01 PMhaxe
package components;
import ceramic.Entity;
import ceramic.InputMap;
import ceramic.Component;
import ceramic.StateMachine;
import enums.PlayerInputEnum;
import enums.PlayerStateEnum;
class PlayerInput extends Entity implements Component {
var inputMap = new InputMap<PlayerInputEnum>();
@component var stateMachine = new StateMachine<PlayerStateEnum>();
function bindAsComponent() {
bindInputs();
stateMachine.state = PlayerStateEnum.DEFAULT;
}
function bindInputs() {
inputMap.bindScanCode(PlayerInputEnum.LEFT, KEY_A);
inputMap.bindScanCode(PlayerInputEnum.RIGHT, KEY_D);
inputMap.bindScanCode(PlayerInputEnum.UP, KEY_W);
inputMap.bindScanCode(PlayerInputEnum.DOWN, KEY_S);
}
function DEFAULT_update(dt: Float) {
log.info('DEFAULT_STATE_UPDATE, $dt');
}
}
the DEFAULT_update is never callbillowy-waiter-28954
04/25/2023, 9:16 PMPlayerInput
object to another entity? (and did you ensure bindAsComponent()
is called, in reaction to that)bland-apple-47181
04/25/2023, 9:20 PMhttps://cdn.discordapp.com/attachments/853414608747364352/1100531696471908425/image.png▾
billowy-waiter-28954
04/25/2023, 9:21 PMbillowy-waiter-28954
04/25/2023, 9:48 PMcomponents
package. As a workaround, rename that package and it should work @bland-apple-47181billowy-waiter-28954
04/25/2023, 9:48 PMcomponents
bland-apple-47181
04/25/2023, 9:50 PMambitious-knife-25690
04/27/2023, 2:39 PMambitious-knife-25690
04/27/2023, 2:48 PMambitious-knife-25690
04/27/2023, 2:52 PMambitious-knife-25690
04/27/2023, 11:58 PMhttps://cdn.discordapp.com/attachments/853414608747364352/1101296291687968868/image.png▾
ambitious-knife-25690
04/27/2023, 11:58 PMambitious-knife-25690
04/27/2023, 11:58 PMambitious-knife-25690
04/27/2023, 11:59 PMbillowy-waiter-28954
04/28/2023, 6:52 AM