Need help with a Stupid Question
Hi, this is probably an easy question for someone who is in the know, but anyway I'm trying to communicate between 2 different classes using a getter in a class, but when I call the getter to get a value I get an error. Heres the code-
//THE PLAYER CLASS
public function get _playerX():Number
{
return this.x;
}
public function get _playerY():Number
{
return this.y;
}
//ENEMY CLASS
private function EnemyAi(){
thePlayerX = Player._playerX;
thePlayerY = Player._playerY;
}
I get this error:
1119: Access of possibly undefined property _playerX through a reference with static type Class.