add encompass world to Game.cs
parent
4496e9670a
commit
74d4e231d2
|
@ -27,6 +27,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FNA\FNA.csproj"/>
|
||||
<ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\build\CopyFNALibs.targets"/>
|
||||
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Encompass;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
|
@ -7,6 +8,9 @@ namespace ProjectName
|
|||
{
|
||||
GraphicsDeviceManager graphics;
|
||||
|
||||
WorldBuilder WorldBuilder { get; } = new WorldBuilder();
|
||||
World World { get; set; }
|
||||
|
||||
public ProjectNameGame()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
|
@ -21,7 +25,7 @@ namespace ProjectName
|
|||
|
||||
protected override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
World = WorldBuilder.Build();
|
||||
}
|
||||
|
||||
protected override void UnloadContent()
|
||||
|
@ -31,21 +35,17 @@ namespace ProjectName
|
|||
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
//
|
||||
// Insert your game update logic here.
|
||||
//
|
||||
World.Update(gameTime.ElapsedGameTime.TotalSeconds);
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
protected override void Draw(GameTime gameTime)
|
||||
{
|
||||
//
|
||||
// Replace this with your own drawing code.
|
||||
//
|
||||
|
||||
GraphicsDevice.Clear(Color.CornflowerBlue);
|
||||
|
||||
World.Draw();
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue