dimanche 9 avril 2017

AS3 Getters/Setters Not Working

I am creating a game using ActionScript 3 trying to change a value of a variable from a different script (class).

On the first script, Class A.

private var _isOnGround:Boolean;
_isOnGround = false;

public function set boolName(bbb:Boolean):void
    {
        _isOnGround = bbb;
    }

On Another Script, Class B.

var classA:ClassA = new ClassA();
classA.boolName = true;

If anyone can explain why this isn't working and offer a solution it would be appreciated.

Aucun commentaire:

Enregistrer un commentaire