Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        vel.SetVal(GetVelocity().ToString());
        time.SetVal(GetTime().ToString());
        frame.SetVal(GetFrame().ToString());
        sp.SetVal(GetVelocity().magnitude.ToString());
        dist.SetVal(GetPos(player).magnitude.ToString());

        //Step 3 - Set values of LogVariable objects
        //End Step 3
    }
    // Update is called once per frame
    void Update()
    {
        //Step 3 - Set values of LogVariable objects
        pos.SetVal(GetPos(player).ToString());
        vel.SetVal(GetVelocity(player).ToString());
        time.SetVal(GetTime().ToString());
        frame.SetVal(GetFrame().ToString());
        sp.SetVal(GetVelocity(player).magnitude.ToString());
        dist.SetVal(GetPos(player).magnitude.ToString());
        //End Step 3


        EnqueueData(LogVariable.GetVals());

        if (GetFrame() % 100 == 0)
        {
            foreach (StreamWriter f in logs)
            {
                f.Flush();
            }
        }
    }