Level H Engine
AimBallComponent.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../../Components/Component.h"
4 #include "../../../Maths/Vec3.h"
5 
9 class AimBallComponent : public Component
10 {
11 public:
15  virtual ~AimBallComponent();
16 
20  virtual void onAwake();
21 
25  virtual void onDestroy();
26 
27  void setVelocities(Vec3 inVel);
28 
29  void update();
30 
31  void setResetPos(Vec3 inPos) { resetPos = inPos; }
32  void resetBall();
33 
34  void applyGravity();
35 
36  void setUse(bool use) { inUse = use; }
37 
38 private:
42  bool inUse;
43 };
Vec3 velocities
The velocites of the ball.
Definition: AimBallComponent.h:40
A class that handles the components.
Definition: Component.h:13
void setVelocities(Vec3 inVel)
Definition: AimBallComponent.cpp:23
virtual void onDestroy()
A virtual function for the componets destroy.
Definition: AimBallComponent.cpp:19
A class that handles the aim ball component.
Definition: AimBallComponent.h:9
virtual void onAwake()
A virtual function for the componets awake.
Definition: AimBallComponent.cpp:12
void setUse(bool use)
Definition: AimBallComponent.h:36
virtual ~AimBallComponent()
A virtual destructor.
Definition: AimBallComponent.cpp:8
Contains the Vec3 structure with functions and overloaded operators.
Definition: Vec3.h:8
void setResetPos(Vec3 inPos)
Definition: AimBallComponent.h:31
void update()
Definition: AimBallComponent.cpp:28
Vec3 resetPos
Definition: AimBallComponent.h:41
void applyGravity()
Definition: AimBallComponent.cpp:39
bool inUse
Definition: AimBallComponent.h:42
void resetBall()
Definition: AimBallComponent.cpp:33