also wanted to mention that
my rotate.cs
// NEEDLE_CODEGEN_START
// auto generated code - do not edit directly
#pragma warning disable
namespace Needle.Typescript.GeneratedComponents
{
public partial class Rotate : UnityEngine.MonoBehaviour
{
public float @speed = 1f;
public float @money = 3f;
public void start(){}
public void update(){}
}
}
// NEEDLE_CODEGEN_END
when rotate.ts is
import { Behaviour, serializable } from "@needle-tools/engine";
export class Rotate extends Behaviour
{
@serializable()
speed : number = 1;
money: number = 3;
start(){
// logging this is useful for debugging in the browser.
// You can open the developer console (F12) to see what data your component contains
console.log(this);
}
// update will be called every frame
update(){
this.gameObject.rotateY(this.context.time.deltaTime * 1);
}
}
it's quite strange that update is empty