-------------------------------
--- Generated by RyderLua------
--- Made By Ash99--------------
--- 1/5/2024 10;31 am friday---
-------------------------------

-- Require the Love2D game framework
local love = require('love')

-- Define variables for text, text color, and player coordinates
local text = "Hello, World!"
local textColor = {255, 255, 255} -- White color
local playerX = 100
local playerY = 100
local playerZ = 0

-- Function to update the game state
function love.update(dt)
    -- Example of changing text and text color
    if love.keyboard.isDown('space') then
        text = "Text changed!"
        textColor = {255, 0, 0} -- Red color
    end

    -- Example of restarting the game
    if love.keyboard.isDown('r') then    
        love.load()
    end
end

-- Function to draw the game to the screen
function love.draw()
    -- Draw the text at a specific position
    love.graphics.setColor(textColor[1], textColor[2], textColor[3])
    love.graphics.print(text, 100, 100)

    -- Draw the player's XYZ coordinates
    love.graphics.setColor(255, 255, 255) -- Reset color to white
    love.graphics.print("Player XYZ: " .. playerX .. "/ " .. playerY .. "/ " .. playerZ, 100, 200)
end

-- Function to reset the game state
function love.load()
    -- Reset text, text color, and player coordinates
    text = "Hello, World!"
    textColor = {255, 255, 255} -- White color
    playerX = 100
    playerY = 100
    playerZ = 0
end
