Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Public Member Functions | Properties | List of all members
Drawing.SimpleLineSprite Class Reference

Use this to draw a line between two points. Instead of DrawLine and Line2D, it can be batched. More...

Inheritance diagram for Drawing.SimpleLineSprite:
VerletPhysics.VerletLink

Public Member Functions

 SimpleLineSprite ()
 Create a grey line sprite. More...
 

Properties

Vector2 PositionA [get, set]
 Point Position A. More...
 
Vector2 PositionB [get, set]
 Point Position B. More...
 
float Width [get, set]
 Line Width. More...
 

Detailed Description

Use this to draw a line between two points. Instead of DrawLine and Line2D, it can be batched.

Definition at line 10 of file SimpleLineSprite.cs.

Constructor & Destructor Documentation

◆ SimpleLineSprite()

Drawing.SimpleLineSprite.SimpleLineSprite ( )
inline

Create a grey line sprite.

Definition at line 58 of file SimpleLineSprite.cs.

59  {
60  Modulate = Colors.LightGray;
61  }

Property Documentation

◆ PositionA

Vector2 Drawing.SimpleLineSprite.PositionA
getset

Point Position A.

Definition at line 15 of file SimpleLineSprite.cs.

16  {
17  get => positionA;
18  set
19  {
20  positionA = value;
21  UpdateTransform();
22  }
23  }

◆ PositionB

Vector2 Drawing.SimpleLineSprite.PositionB
getset

Point Position B.

Definition at line 28 of file SimpleLineSprite.cs.

29  {
30  get => positionB;
31  set
32  {
33  positionB = value;
34  UpdateTransform();
35  }
36  }

◆ Width

float Drawing.SimpleLineSprite.Width
getset

Line Width.

Definition at line 41 of file SimpleLineSprite.cs.

42  {
43  get => width;
44  set
45  {
46  width = value;
47  Scale = new Vector2(width, Scale.y);
48  }
49  }

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