我使用 Haxeflixel,选择构建目标 Neko 和 Neko 64。
我编码了 1280 x 720 分辨率,但执行的屏幕不适合。 也改变分辨率。
我刚刚重新安装了我的 os x yosemite 系统。是什么原因呢? 我无法理解这种情况
var 游戏宽度:Int = 1280;//游戏的宽度(以像素为单位)(实际像素可能会更少/更多,具体取决于您的缩放)。
var gameHeight:Int = 720; // Height of the game in pixels (might be less / more in actual pixels depending on your zoom).
var initialState:Class<FlxState> = PlayState; // The FlxState the game starts with.
var zoom:Float = -1; // If -1, zoom is automatically calculated to fit the window dimensions.
var framerate:Int = 60; // How many frames per second the game should run at.
var skipSplash:Bool = false; // Whether to skip the flixel splash screen that appears in release mode.
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets
非常默认的设置...
最佳答案
如果我理解你的问题,问题是 gameWidth
和 gameHeight
设置游戏的逻辑屏幕大小,而不是游戏运行的窗口的像素大小.
尝试更改项目的 Project.xml
文件中的窗口设置,以设置窗口的物理大小以匹配游戏坐标,它可能会开始看起来像您期望的那样:
<!--These window settings apply to all targets-->
<window width="1280" height="720" fps="60" background="#000000" hardware="true" vsync="true" />
关于Haxeflixel 采用 Neko 构建,屏幕尺寸不适合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30727749/