hexyz is tower defense game, and a lua library for dealing with hexagonal grids
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
773 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. function load_textures()
  2. TEX_MARQUIS = am.texture2d("res/marquis.png")
  3. TEX_ARROW = am.texture2d("res/arrow.png")
  4. TEX_WALL_CLOSED = am.texture2d("res/wall_closed.png")
  5. TEX_MOAT1 = am.texture2d("res/moat1.png")
  6. TEX_TOWER1 = am.texture2d("res/tower1.png")
  7. TEX_TOWER2 = am.texture2d("res/tower2.png")
  8. TEX_MOB1_1 = am.texture2d("res/mob1_1.png")
  9. TEX_MOB2_1 = am.texture2d("res/mob2_1.png")
  10. end
  11. function pack_texture_into_sprite(texture, width, height)
  12. return am.sprite{
  13. texture = texture,
  14. s1 = 0, s2 = 1, t1 = 0, t2 = 1,
  15. x1 = 0, x2 = width, width = width,
  16. y1 = 0, y2 = height, height = height
  17. }
  18. end