I am trying to add an entity to a world.
Here is the entity’s code:
public class lycanthrope extends Entity
{
public var SprLycan:Spritemap = new Spritemap(Assets.Lycanthrope, 128, 128);
public function lycanthrope
{
setHitbox (64, 64);
sprLycan.add("waiting", [0, 1, 2, 3, 4, 5, 6, 7], 8, true);
sprLycan.add("running", [8, 9, 10, 11, 12, 13, 14, 15], 8, true);
graphic= sprLycan;
}
override public function update (): void
{
sprLycan.play("running", false, 0);
x + 2;
y + 2;
}
}
Here is the world:
public class Test_World extends World
{
public function Test_World()
{
add (new(Player));
add (new (lycanthrope));
}
}
However, when I try to test, I get “Error: Access of Undefined Property Lycanthrope”.