Exemplo n.º 1
0
 public static void SetVelocity(this Rigidbody2D @this, Vector2 newValue, ChangeTypeEnum changeTypeTransform, Axis2DCombined axisCombined = Axis2DCombined.XY)
 {
     if (@this)
     {
         Vector3 velocity = @this.velocity;
         @this.velocity = Vector2Extend.ChangeVector(velocity, newValue, changeTypeTransform, axisCombined);
     }
 }
Exemplo n.º 2
0
 public static void SetYVelocity(this Rigidbody2D @this, float yValue, ChangeTypeEnum changeTypeTransform, Vector2 range = default)
 {
     if (@this)
     {
         Vector3 velocity = @this.velocity;
         velocity       = Vector2Extend.ChangeVector(velocity, Axis2DEnum.Y, yValue, changeTypeTransform, range);
         @this.velocity = velocity;
     }
 }