Clean up
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
namespace Zennysoft.Game.Ma.Implementation;
|
||||
|
||||
@@ -11,38 +10,22 @@ public interface IGameRepo : IDisposable
|
||||
void Resume();
|
||||
|
||||
IAutoProp<bool> IsPaused { get; }
|
||||
|
||||
void SetPlayerGlobalTransform(Transform3D playerGlobalTransform);
|
||||
|
||||
public int MaxItemSize { get; }
|
||||
|
||||
public int EXPRate { get; set; }
|
||||
|
||||
public int CurrentFloor { get; set; }
|
||||
}
|
||||
|
||||
public class GameRepo : IGameRepo
|
||||
{
|
||||
public event Action? Ended;
|
||||
|
||||
public IAutoProp<Transform3D> PlayerGlobalTransform => _playerGlobalTransform;
|
||||
private readonly AutoProp<Transform3D> _playerGlobalTransform;
|
||||
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
|
||||
public int MaxItemSize => 20;
|
||||
|
||||
public int EXPRate { get; set; } = 1;
|
||||
|
||||
private bool _disposedValue;
|
||||
|
||||
public int CurrentFloor { get; set; } = 0;
|
||||
|
||||
public GameRepo()
|
||||
{
|
||||
_isPaused = new AutoProp<bool>(true);
|
||||
_playerGlobalTransform = new AutoProp<Transform3D>(Transform3D.Identity);
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
@@ -57,8 +40,6 @@ public class GameRepo : IGameRepo
|
||||
GD.Print("Resume");
|
||||
}
|
||||
|
||||
public void SetPlayerGlobalTransform(Transform3D playerGlobalTransform) => _playerGlobalTransform.OnNext(playerGlobalTransform);
|
||||
|
||||
public void OnGameEnded()
|
||||
{
|
||||
Pause();
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://boai3f4vwgree
|
||||
@@ -1 +0,0 @@
|
||||
uid://dw1wcux7lcpqy
|
||||
@@ -1 +0,0 @@
|
||||
uid://cpu75lmblmbj4
|
||||
@@ -1 +0,0 @@
|
||||
uid://dmbireek8b68t
|
||||
@@ -1 +0,0 @@
|
||||
uid://lwjsht36v6ut
|
||||
@@ -1 +0,0 @@
|
||||
uid://nlpm8t4dege2
|
||||
@@ -1 +0,0 @@
|
||||
uid://c46publoqhqsn
|
||||
@@ -1 +0,0 @@
|
||||
uid://i54nvesmcliy
|
||||
@@ -1 +0,0 @@
|
||||
uid://cq37bi3y07rxa
|
||||
@@ -1 +0,0 @@
|
||||
uid://clh8ucurjwuvh
|
||||
Reference in New Issue
Block a user