I have specified width 1024, height 768 in GameApp, but when I actually draw, I can only draw up to width 800.
What are the possible causes of this?
phina.define('MainScene', {
superClass: 'DisplayScene',
init:function(){
This.superInit();
for (varrow=0; row<32;row++){
for(varcol=0;col<48;col++){
varchipImage="ground";
if(row%2==0&col%2==0){
chipImage="grassland"
}
this.bg=Sprite(chipImage).addChildTo(this);
this.bg.setPosition(32*col,32*row);
this.bg.origin.set(0,0);
}
}
},
});
// main processing
phina.main(function(){
var app = GameApp({
startLabel: 'main',
width: 1024,
height —768,
assets —ASSETS
});
app.enableStats();
app.run();
});
Just give the width and height to Scene!
phina.define('MainScene', {
superClass: 'DisplayScene',
init:function(){
This.superInit (// Give Scene width, height too!)
{
width: 1024,
height768
}
);
for (varrow=0; row<32;row++){
for(varcol=0;col<48;col++){
varchipImage="ground";
if(row%2==0&col%2==0){
chipImage="grassland"
}
this.bg=Sprite(chipImage).addChildTo(this);
this.bg.setPosition(32*col,32*row);
this.bg.origin.set(0,0);
}
}
},
});
// main processing
phina.main(function(){
var app = GameApp({
startLabel: 'main',
width: 1024,
height —768,
assets —ASSETS
});
app.enableStats();
app.run();
});
541 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
541 Understanding How to Configure Google API Key
546 Who developed the "avformat-59.dll" that comes with FFmpeg?
542 PHP ssh2_scp_send fails to send files as intended
653 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.