Exemplo n.º 1
0
    void FixedUpdate()
    {
        if (!hasBeenInitialized)
        {
            for (int i = 0; i < Oracle.FutureSteps; i++)
            {
                Oracle.Step();
            }
            Oracle.ReturnToPresent();
            hasBeenInitialized = true;
        }
        Oracle.CalculateFuture();
        foreach (PlanetBody p in planets)
        {
            p.future.RemoveAt(0);
        }
        Oracle.ReturnToPresent();

        foreach (PlanetBody p in planets)
        {
            p.Attract(dynamics);
        }
        foreach (FixedBody f in statics)
        {
            f.Attract(dynamics);
        }
        foreach (FallingBody f in dynamics)
        {
            f.PhysicsStep();
        }
    }