Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- outside function
- local function countup(view, x, y, stats, name)
- if stats[name] < 25 then stats[name] = stats[name] + 1 end
- view.text = stats[name]
- view:setReferencePoint(display.TopLeftReferencePoint)
- view.x, view.y = x, y
- end
- -- in place
- if goalAttack - self.Stats.Attack ~= 0 then
- timer.performWithDelay(100, function(event) countup(self.attackText, 194, 153, self.Stats, "Attack") end, goalAttack - self.Stats.Attack)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement