GameObjectPool
This commit is contained in:
29
src/Game/GameObject.cpp
Normal file
29
src/Game/GameObject.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "GameObject.hpp"
|
||||
|
||||
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, GameObject *parent)
|
||||
: object_handle(managed_obj), parent(parent)
|
||||
{}
|
||||
|
||||
GameObject &GameObject::operator=(GameObject &&o){
|
||||
transform = o.transform;
|
||||
components = std::move(o.components);
|
||||
object_handle = std::move(o.object_handle);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool GameObject::tryGetComponent(const std::u16string &name, Component **out_component)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GameObject::tryAddComponent(const std::u16string &name, Component &&component)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user