-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameObject.h
51 lines (42 loc) · 1.33 KB
/
GameObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Created by rcabido on 7/11/19.
//
#ifndef ENGINE_GAMEOBJECT_H
#define ENGINE_GAMEOBJECT_H
#include <iostream>
#include "Vector3D.h"
#include "Color.h"
using namespace std;
///////////////////////////////////////////////////////////////////////////
// CLASE GAMEOBJECT //
class GameObject {
private:
Vector3D position; //Posición
Color color; //Color
Vector3D speed; //Velocidad
Vector3D orientation; //Orientación
Vector3D rotationSpeed; //Velocidad de rotación
bool gravity; //Gravedad
public:
//Constructores
GameObject();
GameObject(const Vector3D& position, const Color& color, const Vector3D& speed, const Vector3D& orientation, const Vector3D& orientationSpeed, bool isAffectedByGravity);
//Getters
Vector3D getPosition() const;
Color getColor() const;
Vector3D getSpeed() const;
Vector3D getOrientation() const;
Vector3D getRotationSpeed() const;
bool getGravity() const;
//Setters
void setPosition(const Vector3D& pos);
void setColor(const Color& color);
void setSpeed(const Vector3D& speed);
void setOrientation(const Vector3D& orientation);
void setRotationSpeed(const Vector3D& rSpeed);
void setGravity(const bool& gravity);
//Otros métodos
virtual void render() const = 0;
virtual void update(const float &deltaTime, const Vector3D& gravity);
};
#endif ENGINE_GAMEOBJECT_H