-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgameObject.cpp
More file actions
29 lines (24 loc) · 1.01 KB
/
gameObject.cpp
File metadata and controls
29 lines (24 loc) · 1.01 KB
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
#include "stdafx.h"
#include "gameObject.h"
gameObject::gameObject()
: _name("No Name"), _position(WINSIZEX / 2, WINSIZEY / 2), _width(32), _height(32), _pivot(pivot::CENTER), _isActive(true), _isAlive(true)
{
_rc = RectMakePivot(_position, Vector2(_width, _height), _pivot);
}
gameObject::gameObject(float x, float y)
: _name("No Name"), _position(x, y), _width(32), _height(32), _pivot(pivot::CENTER), _isActive(true), _isAlive(true)
{
_rc = RectMakePivot(_position, Vector2(_width, _height), _pivot);
}
gameObject::gameObject(Vector2 position)
: _name("No Name"), _position(position), _width(32), _height(32), _pivot(pivot::CENTER), _isActive(true), _isAlive(true)
{
}
gameObject::gameObject(const string & name, const float & x, const float & y, const float & width, const float & height, const pivot & pivot)
: _name(name), _position(x, y), _width(width), _height(height), _pivot(pivot), _isActive(true), _isAlive(true)
{
_rc = RectMakePivot(_position, Vector2(_width, _height), _pivot);
}
gameObject::~gameObject()
{
}