Refactoring of status system to prevent bug w/ events
This commit is contained in:
parent
fd8306645b
commit
e89483d612
13 changed files with 487 additions and 113 deletions
|
@ -46,6 +46,16 @@ public sealed class GameSystem : MonoBehaviour
|
|||
{
|
||||
serviceTimer=serviceTime;
|
||||
serviceOpen=true;
|
||||
|
||||
Debug.Log("Service open !");
|
||||
}
|
||||
|
||||
public void endService()
|
||||
{
|
||||
serviceOpen=false;
|
||||
EventManager.Instance.cleanUp(1); //Remove hard obstacle
|
||||
|
||||
Debug.Log("Service closed !");
|
||||
}
|
||||
|
||||
//Change time scale
|
||||
|
@ -127,10 +137,7 @@ public sealed class GameSystem : MonoBehaviour
|
|||
if(UIServiceTimer != null)
|
||||
UIServiceTimer.SetValue(serviceTimer/serviceTime);
|
||||
if (serviceTimer < 0)
|
||||
{
|
||||
serviceOpen = false;
|
||||
Debug.Log("Service closed");
|
||||
}
|
||||
endService();
|
||||
}
|
||||
|
||||
//Temporary manual slowmode toggle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue