C# Class UnityEngine.PolygonCollider2D

Collider for 2D physics representing an arbitrary polygon defined by its vertices.

Inheritance: Collider2D
Datei anzeigen Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
CreatePrimitive ( int sides, [ scale, [ offset ) : void

Creates as regular primitive polygon with the specified number of sides.

Private Methods

Method Description
CreatePrimitive ( int sides ) : void
CreatePrimitive ( int sides, Vector2 scale ) : void
GetPath ( int index ) : Vector2[]
GetTotalPointCount ( ) : int
INTERNAL_CALL_CreatePrimitive ( PolygonCollider2D self, int sides, Vector2 &scale, Vector2 &offset ) : void
SetPath ( int index, Vector2 points ) : void

Method Details

CreatePrimitive() public method

Creates as regular primitive polygon with the specified number of sides.

public CreatePrimitive ( int sides, [ scale, [ offset ) : void
sides int The number of sides in the polygon. This must be greater than two.
scale [ The X/Y scale of the polygon. These must be greater than zero.
offset [ The X/Y offset of the polygon.
return void