Skip to content

Instantly share code, notes, and snippets.

@codepaladin
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codepaladin/72b438209eebe018511d to your computer and use it in GitHub Desktop.
Save codepaladin/72b438209eebe018511d to your computer and use it in GitHub Desktop.
-- create green health bar
healthBar = display.newRect(0,
-45,
maxHealth,
10)
healthBar:setFillColor( 000/255, 255/255, 0/255 )
healthBar.strokeWidth = 1
healthBar:setStrokeColor( 255, 255, 255, .5 )
characterGroup:insert(healthBar)
-- create red damage bar (-create it second so it lays on top)
damageBar = display.newRect(0,
-45,
0,
10)
damageBar:setFillColor( 255/255, 0/255, 0/255 )
characterGroup:insert(damageBar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment