Shkyera Engine
Easy to use, game engine for Python
ShapeLineComponent.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
10 
11 namespace shkyera {
12 
21 class ShapeLineComponent final : public ShapeComponent {
22  public:
26  using ShapeComponent::ShapeComponent;
27 
33  void setX(float x);
34 
40  void setY(float y);
41 
49  virtual void drawShape() override;
50 
51  private:
52  float _x; //< The X-coordinate of the line's displacement.
53  float _y; //< The Y-coordinate of the line's displacement.
54 };
55 
56 } // namespace shkyera
Defines the ShapeComponent class, a base component for handling shapes.
A base component for handling shapes within a game or application.
Definition: ShapeComponent.hpp:24
A specialized shape component for rendering lines within a game or application.
Definition: ShapeLineComponent.hpp:21
void setX(float x)
Set the X-coordinate of the line's displacement.
Definition: ShapeLineComponent.cpp:15
void setY(float y)
Set the Y-coordinate of the line's displacement.
Definition: ShapeLineComponent.cpp:16
float _x
Definition: ShapeLineComponent.hpp:52
virtual void drawShape() override
Draw the line shape.
Definition: ShapeLineComponent.cpp:7
float _y
Definition: ShapeLineComponent.hpp:53
Definition: Entity.cpp:3