I tried extending the behaviour as below
class EightDirection extends IBehaviorInstance
{
constructor()
{
super();
// Start with 5 bullets
this.ammo = 5;
}
shoot()
{
this.ammo --
}
}
And than tried to simulate as below
if (keyboard.isKeyDown("ArrowLeft"))
{
EightDirection.simulateControl("left")
}
But I get a simulateControl is not a function error. PLease help.