コード例 #1
0
    void CalcPosition()
    {
        if (Vector3.Distance(transform.position, path.CalcPositionByDistanceRatio(ratio)) <= 0.1f)
        {
            /* if (timer.GetActive() != true)
             *   timer.StartTimer();*/

            // if (timer.GetSeconds() > 5)
            {
                timer.ResetTimer();
                pos    = path.CalcPositionByDistanceRatio(ratio);
                ratio += 0.1f;
            }
        }

        else
        {
            pos = path.CalcPositionByDistanceRatio(ratio);
        }
    }