コード例 #1
0
    private void HandleFluidDynamicChildren()
    {
        FluidDynamic flchild = GetComponentInNetworkedChildren <FluidDynamic>();

        if (flchild != null)
        {
            player.Accelerate(flchild.CalculateAirFriction(velocity: player.GetVelocity(),
                                                           held_by_player: true));
            player.Accelerate(flchild.CalculateBuoyantForce());
        }
    }
コード例 #2
0
    private void HandleFluidDynamicChildren()
    {
        FluidDynamic flchild = GetComponentInNetworkedChildren <FluidDynamic>();

        if (flchild != null)
        {
            player.Accelerate(flchild.CalculateAirFriction(
                                  velocity: player.GetVelocity(),
                                  desiredDirection: player.GetMoveVector()));
            player.Accelerate(flchild.CalculateBuoyantForce());
        }
    }