コード例 #1
0
ファイル: Lab2.cs プロジェクト: MikeGoll/BoatProject
    // Use this for initialization
    void Start()
    {
        numUpdates = 0;

        currentD = 0;
        oldV     = velocity;
        moving   = true;

        if (useDrag)
        {
            dragConstant = PhysicsCalculator.calculateDragConstant(acceleration, velocity);
        }

        distance = PhysicsCalculator.calculateDistance(0, acceleration, velocity, time);
        dt       = PhysicsCalculator.calculateDragTime(dragConstant, distance, velocity);
    }