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
869 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. function load_textures()
  2. TEX_BUTTON1 = am.texture2d("res/button1.png")
  3. TEX_WIDER_BUTTON1 = am.texture2d("res/wider_button1.png")
  4. TEX_TAB_ICON = am.texture2d("res/tab_icon.png")
  5. TEX_SATELLITE = am.texture2d("res/satelite.png")
  6. TEX_TOWER_WALL = am.texture2d("res/tower_wall.png")
  7. TEX_TOWER_MOAT = am.texture2d("res/tower_moat.png")
  8. TEX_TOWER_REDEYE = am.texture2d("res/tower_redeye.png")
  9. TEX_TOWER_LIGHTHOUSE = am.texture2d("res/tower_lighthouse.png")
  10. TEX_MOB_BEEPER = am.texture2d("res/mob_beeper.png")
  11. end
  12. function pack_texture_into_sprite(texture, width, height)
  13. return am.sprite{
  14. texture = texture,
  15. s1 = 0, s2 = 1, t1 = 0, t2 = 1,
  16. x1 = 0, x2 = width, width = width,
  17. y1 = 0, y2 = height, height = height
  18. }
  19. end