Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Public Member Functions | Public Attributes | List of all members
Physics.SimplePolygon Class Reference

Simple physics polygon. More...

Inherits RigidBody2D.

Inherited by Examples.Chapter5.C5Exercise4.Polygon1, Examples.Chapter5.C5Exercise4.Polygon2, and Examples.Chapter5.C5Exercise4.Polygon3.

Public Member Functions

 SimplePolygon ()
 Create a default polygon. More...
 

Public Attributes

Vector2[] Points
 Polygon points More...
 
Color BaseColor
 Color More...
 

Detailed Description

Simple physics polygon.

Definition at line 8 of file SimplePolygon.cs.

Constructor & Destructor Documentation

◆ SimplePolygon()

Physics.SimplePolygon.SimplePolygon ( )
inline

Create a default polygon.

Definition at line 23 of file SimplePolygon.cs.

24  {
25  polygonShape2D = new ConvexPolygonShape2D();
26  collisionShape2D = new CollisionShape2D() { Shape = polygonShape2D };
27  }

Member Data Documentation

◆ BaseColor

Color Physics.SimplePolygon.BaseColor

Color

Definition at line 14 of file SimplePolygon.cs.

◆ Points

Vector2 [] Physics.SimplePolygon.Points

Polygon points

Definition at line 11 of file SimplePolygon.cs.


The documentation for this class was generated from the following file: