mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
add DemoComponent to DefaultScene
This commit is contained in:
parent
4f6475d3f0
commit
dbf6e99794
@ -1,3 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Nez;
|
||||
using Nez.ImGuiTools;
|
||||
|
||||
@ -7,11 +9,16 @@ namespace project_name
|
||||
{
|
||||
public override void initialize()
|
||||
{
|
||||
setDesignResolution( Screen.width, Screen.height, Scene.SceneResolutionPolicy.None );
|
||||
setDesignResolution(Screen.width, Screen.height, Scene.SceneResolutionPolicy.None);
|
||||
|
||||
addRenderer(new DefaultRenderer());
|
||||
|
||||
var logo = content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
|
||||
createEntity("demo imgui draw commands")
|
||||
.setPosition(new Vector2(150, 150))
|
||||
.addComponent<DemoComponent>()
|
||||
.addComponent(new PrototypeSprite(20, 20));
|
||||
|
||||
var logo = content.Load<Texture2D>("nez-logo-black");
|
||||
createEntity("logo")
|
||||
.setPosition(Screen.center)
|
||||
.addComponent(new Nez.Sprites.Sprite(logo));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user