Пример #1
0
    // Use this for initialization
    void Start()
    {
        InitialConditions ic = InitialConditions.Instance();

        v = new float[] { ic.v, 0, 0 };
        r = new float[] { 0, -ic.r, 0 };
        a = new float[3];

        mass  = centralBody.mass;
        dt    = ic.dt;
        speed = ic.GetSpeed();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        // precalc acceleration
        InitialConditions ic = InitialConditions.Instance();

        v = new float[] { ic.v, 0, 0 };
        transform.position = new Vector3(0, ic.r, 0);
        r = new float[] { 0, ic.r, 0 };
        a = new float[3];
        CalcAcceleration();
        mass = centralBody.mass;

        speed = ic.GetSpeed();
        dt    = ic.dt;
    }