gpt4 book ai didi

lua - LÖVE 中的背景颜色

转载 作者:行者123 更新时间:2023-12-05 01:46:11 26 4
gpt4 key购买 nike

我已经设置了一个配置文件,并且刚刚开始编写一个程序来为基于文本的角色扮演游戏/模拟游戏设置标题屏幕。背景颜色似乎没有从默认的黑色改变,这就是问题所在。我已经在下面发布了我现有的代码。是的,我正在执行包含配置文件和此代码的整个文件夹。

function love.load()
love.graphics.setBackgroundColor( 255, 255, 255 )
end

function love.update(dt)
end

function
love.graphics.newImage (\LUA txt adventure\Title.png)
end
function love.conf(t)
t.modules.joystick = true -- Enable the joystick module (boolean)
t.modules.audio = false -- Enable the audio module (boolean)
t.modules.keyboard = true -- Enable the keyboard module (boolean)
t.modules.event = true -- Enable the event module (boolean)
t.modules.image = true -- Enable the image module (boolean)t.modules.graphics = true -- Enable the graphics module (boolean)
t.modules.timer = true -- Enable the timer module (boolean)
t.modules.mouse = true -- Enable the mouse module (boolean)
t.modules.sound = false -- Enable the sound module (boolean)
t.modules.thread = true
t.modules.physics = true -- Enable the physics module (boolean)
t.console = false -- Attach a console (boolean, Windows only)
t.title = "Space Trade Sim" -- The title of the window the game is in (string)
t.author = "Magikarp" -- The author of the game (string)
t.window.fullscreen = false -- Enable fullwindow (boolean)
t.window.vsync = false -- Enable vertical sync (boolean)
t.window.fsaa = 0 -- The number of FSAA-buffers (number)
t.window.height = 600 -- The window height (number)
t.window.width = 800 -- The window width (number)
end

最佳答案

love.graphics.setBackgroundColor() 不能做 (255, 255, 255)。 LÖVE(自 V 11.0 起)设置颜色有点不同,using a range of 0 thru 1对于每个组件;所以,试试 love.graphics.setBackgroundColor( 1, 1, 1 )love.graphics.setBackgroundColor( 255/255, 255/255, 255/255 )/p>

关于lua - LÖVE 中的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37017458/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com