Advertisement
alestane

Bridge function

Apr 22nd, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. -- outside function
  2. local function countup(view, x, y, stats, name)
  3.     if stats[name] < 25 then stats[name] = stats[name] + 1 end
  4.     view.text = stats[name]
  5.     view:setReferencePoint(display.TopLeftReferencePoint)
  6.     view.x, view.y = x, y
  7. end
  8.  
  9. --  in place
  10.     if goalAttack - self.Stats.Attack ~= 0 then
  11.         timer.performWithDelay(100, function(event) countup(self.attackText, 194, 153, self.Stats, "Attack") end, goalAttack - self.Stats.Attack)
  12.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement