mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2026-02-01 19:10:16 +07:00
move Scene code into a class
This commit is contained in:
20
project_name/DefaultScene.cs
Normal file
20
project_name/DefaultScene.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user