0
我目前正在通过Starling和AS3开发游戏。Adobe AIR模拟器显示错误的尺寸
我遇到了一个奇怪的问题。我的模拟器不显示完整的阶段。 图片以获得更好的解释:http://i.stack.imgur.com/OoMzt.png
我测试了一下,发现一个高度为775的Quad填充800 stageHeight的整个高度。这是为什么?应该有25个空间。
这是因为我在Mac上运行,窗口显示错误?
我目前正在通过Starling和AS3开发游戏。Adobe AIR模拟器显示错误的尺寸
我遇到了一个奇怪的问题。我的模拟器不显示完整的阶段。 图片以获得更好的解释:http://i.stack.imgur.com/OoMzt.png
我测试了一下,发现一个高度为775的Quad填充800 stageHeight的整个高度。这是为什么?应该有25个空间。
这是因为我在Mac上运行,窗口显示错误?
//////////////////////////////////////////////////
//this is the size used to test NOT the device size
var widthDevelop:int = yourStageWidth;
//Example var widthDevelop:int = 480;
var screenWidth:int = stage.stageWidth;
var screenHeight:int = stage.stageHeight;
var viewPort:Rectangle = RectangleUtil.fit(
new Rectangle(0, 0, widthDevelop, screenHeight*(widthDevelop/screenWidth)),
new Rectangle(0, 0, screenWidth, screenHeight),
ScaleMode.NO_BORDER);
this._starling.viewPort = viewPort;
this._starling.stage.stageWidth = widthDevelop;
this._starling.stage.stageHeight = screenHeight*(widthDevelop/screenWidth);
谢谢我要用它来测试 – Capevace 2014-10-17 20:43:00