on source codes, why do people synthesis like this:
@synthesis hp = _curHp;
@synthesis moveDuration = _moveDuration;
@synthesize curWaypoint = _curWaypoint;
A fast, easy to use, free, and community supported 2D game engine
on source codes, why do people synthesis like this:
@synthesis hp = _curHp;
@synthesis moveDuration = _moveDuration;
@synthesize curWaypoint = _curWaypoint;
It's allowing a property to have a different name (or alias) than what is explicitly defined in the class.
Internally to the class the variable is _hp but when you access that class property you will access it as hp.
thank you!
You must log in to post.