Exemplo n.º 1
0
Arquivo: Game.cs Projeto: L4fter/Orb
    public void MakeTimestep(float deltaTime)
    {
        celestialSystem.SimulateTimestep(deltaTime);

        if (inputPlanetController.Planet.Hp > 0 &&
            aiPlanetController.Planet.Hp <= 0)
        {
            winLoseHandler.Win();
            return;
        }

        if (inputPlanetController.Planet.Hp <= 0)
        {
            winLoseHandler.Lose();
            return;
        }

        if (timeOfSerialization + 1 < Time.time)
        {
            serializer.Serialize(celestialSystem);
        }
    }
Exemplo n.º 2
0
 public void DebugWin()
 {
     winLoseHandler.Win();
 }