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.

24 lines
727 B

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_TOWER1 = am.texture2d("./res/tower1.png")
  6. TEX_TOWER2 = am.texture2d("./res/tower2.png")
  7. TEX_MOB1_1 = am.texture2d("./res/mob1_1.png")
  8. TEX_MOB2_1 = am.texture2d("./res/mob2_1.png")
  9. end
  10. function pack_texture_into_sprite(texture, width, height)
  11. return am.sprite{
  12. texture = texture,
  13. s1 = 0, s2 = 1, t1 = 0, t2 = 1,
  14. x1 = 0, x2 = width, width = width,
  15. y1 = 0, y2 = height, height = height
  16. }
  17. end