Create RabiRibiState for other state outside of the InGameState
This commit is contained in:
parent
d6f701b12e
commit
51fd7d3cd7
@ -6,19 +6,13 @@ using System.Text;
|
|||||||
|
|
||||||
namespace rabi_splitter_WPF
|
namespace rabi_splitter_WPF
|
||||||
{
|
{
|
||||||
enum GameStatus
|
|
||||||
{
|
|
||||||
INGAME,
|
|
||||||
MENU
|
|
||||||
}
|
|
||||||
|
|
||||||
class RabiRibiDisplay
|
class RabiRibiDisplay
|
||||||
{
|
{
|
||||||
private MainContext mainContext;
|
private MainContext mainContext;
|
||||||
private DebugContext debugContext;
|
private DebugContext debugContext;
|
||||||
private MainWindow mainWindow;
|
private MainWindow mainWindow;
|
||||||
|
|
||||||
private GameStatus gameStatus = GameStatus.MENU;
|
private RabiRibiState rabiRibiState;
|
||||||
private InGameState inGameState;
|
private InGameState inGameState;
|
||||||
private MemorySnapshot prevSnapshot;
|
private MemorySnapshot prevSnapshot;
|
||||||
private MemorySnapshot snapshot;
|
private MemorySnapshot snapshot;
|
||||||
@ -32,6 +26,7 @@ namespace rabi_splitter_WPF
|
|||||||
public RabiRibiDisplay(MainContext mainContext, DebugContext debugContext, MainWindow mainWindow)
|
public RabiRibiDisplay(MainContext mainContext, DebugContext debugContext, MainWindow mainWindow)
|
||||||
{
|
{
|
||||||
this.datastrings = new string[StaticData.EnenyEntitySize[mainContext.veridx]];
|
this.datastrings = new string[StaticData.EnenyEntitySize[mainContext.veridx]];
|
||||||
|
this.rabiRibiState = new RabiRibiState();
|
||||||
this.mainContext = mainContext;
|
this.mainContext = mainContext;
|
||||||
this.debugContext = debugContext;
|
this.debugContext = debugContext;
|
||||||
this.mainWindow = mainWindow;
|
this.mainWindow = mainWindow;
|
||||||
@ -202,18 +197,18 @@ namespace rabi_splitter_WPF
|
|||||||
private void StartNewGame()
|
private void StartNewGame()
|
||||||
{
|
{
|
||||||
inGameState = new InGameState();
|
inGameState = new InGameState();
|
||||||
gameStatus = GameStatus.INGAME;
|
rabiRibiState.gameStatus = GameStatus.INGAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReturnToMenu()
|
private void ReturnToMenu()
|
||||||
{
|
{
|
||||||
gameStatus = GameStatus.MENU;
|
rabiRibiState.gameStatus = GameStatus.MENU;
|
||||||
inGameState = null;
|
inGameState = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool InGame()
|
private bool InGame()
|
||||||
{
|
{
|
||||||
return gameStatus == GameStatus.INGAME;
|
return rabiRibiState.gameStatus == GameStatus.INGAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool MusicChanged()
|
private bool MusicChanged()
|
||||||
|
18
rabi_splitter_WPF/RabiRibiState.cs
Normal file
18
rabi_splitter_WPF/RabiRibiState.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace rabi_splitter_WPF
|
||||||
|
{
|
||||||
|
enum GameStatus
|
||||||
|
{
|
||||||
|
INGAME,
|
||||||
|
MENU
|
||||||
|
}
|
||||||
|
|
||||||
|
class RabiRibiState
|
||||||
|
{
|
||||||
|
public GameStatus gameStatus = GameStatus.MENU;
|
||||||
|
}
|
||||||
|
}
|
@ -55,10 +55,11 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Compile Include="InGameState.cs" />
|
||||||
<Compile Include="RabiEnums.cs" />
|
<Compile Include="RabiEnums.cs" />
|
||||||
<Compile Include="MemorySnapshot.cs" />
|
<Compile Include="MemorySnapshot.cs" />
|
||||||
<Compile Include="RabiGameState.cs" />
|
|
||||||
<Compile Include="RabiRibiDisplay.cs" />
|
<Compile Include="RabiRibiDisplay.cs" />
|
||||||
|
<Compile Include="RabiRibiState.cs" />
|
||||||
<Compile Include="StaticData.cs" />
|
<Compile Include="StaticData.cs" />
|
||||||
<Page Include="MainWindow.xaml">
|
<Page Include="MainWindow.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user