You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do something like
createText{
text = self.player.xp,
size = 32,
reference = display.MiddleCenterReferencePoint,
x = self.width / 2,
y = self.height / 2,
group = self.group
}
The text was updated successfully, but these errors were encountered:
Add a layer to create a more flexible API.
e.g. instead of
self.xpCounter = display.newText(self.player.xp, 0, 0, native.systemFontBold, 32)
self.xpCounter:setReferencePoint(display.MiddleCenterReferencePoint)
self.xpCounter:rotate(self.player.direction)
self.xpCounter.x = self.width / 2
self.xpCounter.y = self.height / 2
self.xpCounter:setTextColor(0, 0, 0)
self.group:insert(self.xpCounter)
Do something like
createText{
text = self.player.xp,
size = 32,
reference = display.MiddleCenterReferencePoint,
x = self.width / 2,
y = self.height / 2,
group = self.group
}
The text was updated successfully, but these errors were encountered: