text: #include "CGameObjectFence2.h"
  #include "CGameManager.h"
  #include "CPhysicsManager.h"
  #include "CPhysicsProfile.h"
  #include "IPhysicsStrategy.h"
  
  #include "OgreEntity.h"
  #include "OgreSceneNode.h"
  #include "OgreSceneManager.h"
  
  
  using namespace Core;
  
  namespace Core
  {
  namespace Plugin
  {
  
  CGameObjectFence2::CGameObjectFence2(const char* Name, Vector3& Pos) : CGameObject(Name)
  {
  	Node = CGameManager::Instance()->GetSceneManager()->getRootSceneNode()->createChildSceneNode(Name + String("_node"), Pos);
  	Entity = CGameManager::Instance()->GetSceneManager()->createEntity(Name + String("_entity"), "Fence2.mesh");
  	Entity->setQueryFlags(SQF_GAMEOBJECT);
  	Node->attachObject(Entity);
  	//Node->setScale(1.0f, 1.0f, 1.0f);
  
  	// TODO: Customize physics profile here
  	// ===================================
  	PhysicsProfile = Physics::CPhysicsManager::Instance()->GetPhysicsProfile(Physics::CPhysicsManager::DEFAULT_LIGHT_CUBE);
  	if(PhysicsProfile)
  	{
  		Physics::CPhysicsManager::Instance()->GetStrategy()->AddShape(this);
  	}
  	// ===================================
  
  	GameObjectType = "FENCE2";
  }
  
  void CGameObjectFence2::Update(const f32& elapsedTime)
  {
  }
  
  CGameObjectFence2::~CGameObjectFence2()
  {
  	Physics::CPhysicsManager::Instance()->GetStrategy()->DestroyPhysicsBody(this);
  }
  
  CGameObjectFence2Factory::CGameObjectFence2Factory()
  {
  	GameObjectType = "FENCE2";
  }
  
  CGameObjectFence2Factory::~CGameObjectFence2Factory()
  {
  }
  
  Core::CGameObject* CGameObjectFence2Factory::CreateObject(const char* Name, Vector3& Pos)
  {
  	return new Plugin::CGameObjectFence2(Name, Pos);
  }
  }
  }
  