getting closer to zero config

This commit is contained in:
Mike
2019-02-10 19:59:53 -08:00
parent 5e618eca79
commit 4a49a86ae7
7 changed files with 48 additions and 27 deletions

View File

@@ -27,6 +27,7 @@
],
"group": "build",
"problemMatcher": "$msCompile",
"dependsOn": "Build Content",
},
{

View File

@@ -16,3 +16,15 @@
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Nez.dll
#---------------------------------- Content ---------------------------------#
#begin nez-logo-black.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:nez-logo-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,38 +1,27 @@
using System;
using Nez;
using Microsoft.Xna.Framework;
namespace project_name
{
class Game1 : Game
class Game1 : Core
{
GraphicsDeviceManager graphics;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
public Game1() : base()
{}
override protected void Initialize()
{
base.Initialize();
}
var newScene = new Scene();
newScene.addRenderer(new DefaultRenderer());
override protected void LoadContent()
{
base.LoadContent();
}
var logo = newScene.content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
newScene.createEntity("logo")
.setPosition(Screen.center)
.addComponent(new Nez.Sprites.Sprite(logo));
override protected void Update(GameTime gameTime)
{
base.Update(gameTime);
}
override protected void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gameTime);
scene = newScene;
}
}
}

View File

@@ -11,6 +11,7 @@
<!-- Reference FNA project -->
<ItemGroup>
<ProjectReference Include="../FNA/FNA.csproj" />
<ProjectReference Include="../Nez.FNA/Nez.FNA/Nez.FNA.csproj" />
</ItemGroup>
<!-- Include the Content directory (except for .fx files, since we use .fxb at runtime) -->