Add new IScene interface.

This commit is contained in:
Colin McMillen 2020-07-15 11:48:30 -04:00
parent 811df57950
commit 9b25a8a6e0
4 changed files with 10 additions and 2 deletions

7
Shared/IScene.cs Normal file
View File

@ -0,0 +1,7 @@
using System;
namespace SemiColinGames {
public interface IScene : IDisposable {
void Draw(bool isRunningSlowly, IWorld iworld, bool paused);
}
}

View File

@ -4,7 +4,7 @@ using Microsoft.Xna.Framework.Graphics;
using System;
namespace SemiColinGames {
public sealed class Scene : IDisposable {
public sealed class Scene : IScene {
const float DESIRED_ASPECT_RATIO = 1920.0f / 1080.0f;
Color backgroundColor = Color.CornflowerBlue;

View File

@ -12,6 +12,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Camera.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ExtensionMethods.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FSM.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IScene.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IWorld.cs" />
<Compile Include="$(MSBuildThisFileDirectory)NPC.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ProfilingList.cs" />

View File

@ -21,7 +21,7 @@ namespace SemiColinGames {
readonly Timer updateTimer = new Timer(TARGET_FRAME_TIME / 2.0, "UpdateTimer");
readonly Timer drawTimer = new Timer(TARGET_FRAME_TIME / 2.0, "DrawTimer");
Scene scene;
IScene scene;
IWorld world;
public SneakGame() {