Summary
Various utility methods used throughout the
PlatformerGameKit
.- Assembly
- PlatformerGameKit
.dll - Namespace
- PlatformerGameKit
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["PlatformerUtilities"]
class Type type-node
Syntax
public static class PlatformerUtilities
Fields
Name | Constant Value | Summary |
---|---|---|
OneContact |
An array of one contact for physics queries.
static
|
|
OneRaycastHit |
An array of one hit for physics queries.
static
|
Methods
Name | Value | Summary |
---|---|---|
Clamp |
void |
Makes sure the `value` is between the `min` and `max` (inclusive).
static
|
DoHandle2D |
Vector2 |
[Editor-Only] Draws a 2D handle at the specified `position` which can be dragged around.
static
|
DrawBox |
void |
static
|
DrawBoxCast |
void |
static
|
DrawLine |
void |
static
|
DrawRay |
void |
static
|
GetTeam |
Team |
static
|
InsertAt |
void |
Resizes the `array` to be 1 larger and inserts the `item` at the specified `index`.
static
|
IsAlly |
bool |
static
|
IsEnemy |
bool |
static
|
IsEnemy |
bool |
static
|
IsEnemy |
bool |
static
|
NotNegative |
void |
Makes sure the `value` is not negative.
static
|
NotNegative |
void |
Makes sure the `value` is not negative.
static
|
PerpendicularA |
Vector2 |
Returns a new vector that is perpendicular to the `original`.
static
|
PerpendicularAXY |
Vector3 |
Returns a new vector that is perpendicular to the `original` on the XY plane.
static
|
PerpendicularB |
Vector2 |
Returns a new vector that is perpendicular to the `original`.
static
|
PerpendicularBXY |
Vector3 |
Returns a new vector that is perpendicular to the `original` on the XY plane.
static
|
RemoveAt |
void |
Removes the item at the specified `index` and resizes the `array` to be 1 smaller.
static
|
RoundToPixel |
Vector2 |
[Editor-Only]
Returns a copy of the `point` rounded to the nearest pixel of the
UnityEngine.SpriteRenderer attached to
the `gameObject` (or its parent or children).
static
|
SmoothDamp |
float |
Returns the `target` if `smoothTime` is 0. Otherwise calls
UnityEngine.Mathf.SmoothDamp(System.Single,System.Single,System.Single@,System.Single) .
static
|
SmoothDamp |
Vector2 |
Returns the `target` if `smoothTime` is 0. Otherwise calls
UnityEngine.Vector2.SmoothDamp(UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2@,System.Single) .
static
|