move Scene code into a class

This commit is contained in:
Mike
2019-02-18 22:46:59 -08:00
parent a64bc8356d
commit e689a13d70
3 changed files with 23 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
using Nez;
using Nez.ImGuiTools;
namespace project_name
{
public class DefaultScene : Scene
{
public override void initialize()
{
setDesignResolution( Screen.width, Screen.height, Scene.SceneResolutionPolicy.None );
addRenderer(new DefaultRenderer());
var logo = content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
createEntity("logo")
.setPosition(Screen.center)
.addComponent(new Nez.Sprites.Sprite(logo));
}
}
}