31 lines
684 B
C++
31 lines
684 B
C++
#include "GameObject.hpp"
|
|
|
|
namespace ougge {
|
|
|
|
std::ostream& operator<<(std::ostream& s, Transform& t){
|
|
s<<"{ position: {x: "<<t.position.x<<", y: "<<t.position.y;
|
|
s<<"}, rotation: "<<t.rotation;
|
|
s<<", scale {x: "<<t.scale.x<<", y: "<<t.scale.y<<"} }";
|
|
return s;
|
|
}
|
|
|
|
GameObject::GameObject(Mono::Object managed_obj)
|
|
: object_handle(managed_obj)
|
|
{}
|
|
|
|
GameObject::GameObject(GameObject &&o) :
|
|
object_handle(std::move(o.object_handle)),
|
|
parent(o.parent),
|
|
transform(o.transform)
|
|
{
|
|
}
|
|
|
|
GameObject& GameObject::operator=(GameObject &&o){
|
|
object_handle = std::move(o.object_handle);
|
|
parent = o.parent;
|
|
transform = o.transform;
|
|
return *this;
|
|
}
|
|
|
|
}
|