Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

how do i use the love enums module lua assist

function love.load()
  print(enums.entitytags.player)
  print(enums.entitytags.enemy)

  enums.gamestates.main = true
end

function love.update(dt)
  if enums.gamestates.play == true then
     print("You are in the Play State")
  end
  if enums.gamestates.main == true then
     print("You are in the Main Menu State")
  end
  if enums.gamestates.exit == true then
     print("You are in the Exit State")
  end
  if enums.gamestates.paused == true then
     print("You are in the Paused State")
  end
end
 
PREVIOUS NEXT
Tagged: #love #enums #module #lua #assist
ADD COMMENT
Topic
Name
3+5 =