export default class Player extends godot.KinematicBody2D {
constructor() {
super();
this.direction = new godot.Vector2(1, 0);
}
_ready() {
}
_process(delta) {
this.position.x += this.direction.x; //does nothing. Same if I use a hard-coded value
}
}
godot.register_property(Player, 'direction', new godot.Vector2(1, 0));
godot.register_property(player, 'direction', new godot.Vector2(1, 0)); //crashes godot instead of an error message
export default class Player extends godot.KinematicBody2D { constructor() { super(); this.direction = new godot.Vector2(1, 0); } _ready() { } _process(delta) { this.position.x += this.direction.x; //does nothing. Same if I use a hard-coded value } } godot.register_property(Player, 'direction', new godot.Vector2(1, 0));
godot.register_property(player, 'direction', new godot.Vector2(1, 0)); //crashes godot instead of an error message