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

Simple static wall. More...

Inherits StaticBody2D.

Public Member Functions

 SimpleWall ()
 Create a default static wall with 10x10px extents. More...
 

Public Attributes

Color BaseColor = Colors.Olive
 Wall color More...
 

Properties

Vector2 BodySize [get, set]
 Wall size More...
 

Detailed Description

Simple static wall.

Definition at line 8 of file SimpleWall.cs.

Constructor & Destructor Documentation

◆ SimpleWall()

Physics.SimpleWall.SimpleWall ( )
inline

Create a default static wall with 10x10px extents.

Definition at line 26 of file SimpleWall.cs.

27  {
28  rectangleShape2D = new RectangleShape2D() { Extents = new Vector2(10, 10) };
29  collisionShape2D = new CollisionShape2D() { Shape = rectangleShape2D };
30  collisionShape2D.Shape = rectangleShape2D;
31  }

Member Data Documentation

◆ BaseColor

Color Physics.SimpleWall.BaseColor = Colors.Olive

Wall color

Definition at line 11 of file SimpleWall.cs.

Property Documentation

◆ BodySize

Vector2 Physics.SimpleWall.BodySize
getset

Wall size

Definition at line 14 of file SimpleWall.cs.

15  {
16  get => rectangleShape2D.Extents * 2;
17  set => rectangleShape2D.Extents = value / 2;
18  }

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