change: gravity settings functions and deprecation of jump/gravity split
This commit is contained in:
@@ -16,4 +16,11 @@ public static class MathExtensions{
|
||||
public static Color Alpha(this Color input, float newAlpha){
|
||||
return new Color(input.r, input.g, input.b, newAlpha);
|
||||
}
|
||||
|
||||
public static Vector2 Rotate(this Vector2 v, float delta) {
|
||||
return new Vector2(
|
||||
v.x * Mathf.Cos(delta) - v.y * Mathf.Sin(delta),
|
||||
v.x * Mathf.Sin(delta) + v.y * Mathf.Cos(delta)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user