本文整理汇总了C++中ISceneManager::getRootSceneNode方法的典型用法代码示例。如果您正苦于以下问题:C++ ISceneManager::getRootSceneNode方法的具体用法?C++ ISceneManager::getRootSceneNode怎么用?C++ ISceneManager::getRootSceneNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISceneManager
的用法示例。
在下文中一共展示了ISceneManager::getRootSceneNode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Terrain
// ----------------------------------------------------------------------------
Track::Track(f32 tx, f32 tz)
{
ISceneManager* sm = Editor::getEditor()->getSceneManager();
m_terrain = new Terrain(sm->getRootSceneNode(), sm, 1, tx, tz,
min_(2 * ((s32) tx),200), min_(2 * ((s32) tz),200));
ISpline* spline = new TCR(sm->getRootSceneNode(), sm, 0);
m_driveline = new DriveLine(sm->getRootSceneNode(), sm, 0, spline, L"DriveLine");
m_roads.push_back(m_driveline);
m_music = "Origin.music";
m_valid = true;
} // Track
示例2: main
int main()
{
IrrlichtDevice* irrDevice = createDevice(EDT_OPENGL,dimension2d<s32>(800,600),32,false,false,false,0);
IVideoDriver* irrVideo = irrDevice->getVideoDriver();
ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
TMovie* movie = new TMovie(irrDevice->getTimer());
movie->LoadMovie("Mymovie.avi");
irrVideo->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, false);
u32 w = movie->getMovieWidth();
u32 h = movie->getMovieHeight();
ITexture* movTxtr = irrVideo->addTexture(dimension2d<s32>(w<513?512:1024,h<513?512:1024),"imovie");
irrSceneMgr->addCameraSceneNode(0, vector3df(0,0,-20), vector3df(0,0,0));
CSampleSceneNode* myNode = new CSampleSceneNode(irrSceneMgr->getRootSceneNode(), irrSceneMgr, 666);
myNode->setMaterialTexture( 0, movTxtr);
myNode->drop();
ISceneNodeAnimator* anim = irrSceneMgr->createRotationAnimator(vector3df(0,0.1f,0));
myNode->addAnimator(anim);
anim->drop();
while(irrDevice->run())
{
irrVideo->beginScene(true, true, SColor(0,200,200,200));
if (movie->NextMovieFrame())
movie->DrawMovie(0,0,movTxtr);
irrSceneMgr->drawAll();
irrVideo->endScene();
}
irrDevice->drop();
return 0;
}
示例3: getIView
CWayPoint::CWayPoint()
{
m_objectType = CGameObject::WaypointObject;
m_next = NULL;
m_back = NULL;
m_timeWait = 0;
ISceneManager *smgr = getIView()->getSceneMgr();
// init waypoint mesh
//CColladaMeshComponent *comp = new CColladaMeshComponent( this );
//comp->loadFromFile( getIView()->getPath("data/editor/waypoint.dae") );
//addComponent( comp );
//setLighting( false );
m_node = new CGameBoxSceneNode(this, 5, smgr->getRootSceneNode(), smgr, (s32)m_objectID);
m_node->getMaterial(0).Lighting = true;
#ifdef GSEDITOR
setVisible ( true );
// add collision
ITriangleSelector *selector = smgr->createTriangleSelectorFromBoundingBox( m_node );
m_node->setTriangleSelector(selector);
selector->drop();
#else
setVisible ( false );
#endif
}
示例4: example_customscenenode
int example_customscenenode()
{
// create device
IrrlichtDevice *device = startup();
if (device == 0) return 1; // could not create selected driver.
// create engine and camera
EventReceiver_basic receiver(device);
device->setEventReceiver(&receiver);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
smgr->addCameraSceneNode(0, vector3df(0, -40, 0), vector3df(0, 0, 0));
CSampleSceneNode *myNode = new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
ISceneNodeAnimator* anim = smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));
if (anim) {
myNode->addAnimator(anim);
anim->drop();
anim = 0; // As I shouldn't refer to it again, ensure that I can't
}
myNode->drop();
myNode = 0; // As I shouldn't refer to it again, ensure that I can't
return run(device);
}
示例5: BasePlayer
DummyObject::DummyObject(vector3df position,
double radius,
vector3df velocity,
double maxSpeed,
vector3df heading,
double mass,
vector3df scale,
double turnRate,
double maxForce,
DUMMY_OBJECT_TYPE initState,
u32 groupID)
: BasePlayer(position, radius, velocity, maxSpeed, heading, mass, scale, turnRate, maxForce, PLAYER_ROLE_DUMMY)
{
m_pStateMachine = new StateMachine<DummyObject>(this);
// start from idle state
m_pStateMachine->SetCurrentState(IdleDummy::Instance());
// get ready sprite
#if USE_BILL_BOARD_SPRITE
ISceneManager* pSmgr = IrrDevice::GetInstance().GetSmgr();
m_p2DSprite = new BillBoard(pSmgr->getRootSceneNode(), pSmgr, 300);
m_p2DSprite->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
ITexture* pTexture = IrrDevice::GetInstance().GetDriver()->getTexture("Rsrc/hero.bmp");
m_p2DSprite->setMaterialTexture(0, pTexture);
m_p2DSprite->setMaterialFlag(video::EMF_LIGHTING, false);
m_p2DSprite->setMaterialFlag(video::EMF_ZBUFFER, false);
m_p2DSprite->setPosition(position);
m_p2DSprite->setID(0);
m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureScale(0.5f,0.5f);
#else
ISceneManager* pSmgr = IrrDvc.GetSmgr();
IVideoDriver* pDriver = IrrDvc.GetDriver();
m_p2DSprite = pSmgr->addBillboardSceneNode();
m_p2DSprite->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
//video::ITexture* pTexture = pDriver->getTexture("Rsrc/bullet.tga");
video::ITexture* pTexture = pDriver->getTexture("Rsrc/z_tunnel2.tga");
pTexture->grab();
m_p2DSprite->setMaterialTexture(0, pTexture);
m_p2DSprite->setMaterialFlag(video::EMF_LIGHTING, false);
m_p2DSprite->setMaterialFlag(video::EMF_ZBUFFER, true);
m_p2DSprite->setMaterialFlag(video::EMF_ZWRITE_ENABLE, true);
//m_p2DSprite->setSize(dimension2df(scale.X, scale.Y));
m_p2DSprite->setPosition(position);
m_p2DSprite->setID(ID());
// m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureScale(0.5f,0.5f);
m_initState = initState;
//patrol¿¡ »ç¿ëµÉ µ¥ÀÌŸ ÃßÈÄ ·¹º§ µðÀÚÀÎµÈ ½ºÅ©¸³Æ®¿¡ ÀÇÇØ ™VÆõǵµ·Ï ¼öÁ¤¿ä
//ÇöÀç MoviingEntity ¿Í º¯¼ö ¿¬°áÀº ³ªÁß¿¡ AI Å×½ºÆ®¸¦ À§ÇØ Àӽ÷Π¸¸µê.
m_fSpeed = 30.0f;
m_bDirection=true;
m_3dfStart = this->Pos()-vector3df(30.0f,0.0f,0.0f);
m_3dfDest= this->Pos()+vector3df(30.0f,0.0f,0.0f);
#endif
// add into entity mamager
m_uGroupID = groupID;
//EntityMgr.RegisterEntity(m_uGroupID,this);//test code Áö±ÝÀº ±×³É 1·Î ³ªÁß¿¡ ÀÎÀڷΠó¸®
}
示例6: BasePlayer
FugitivePlayer::FugitivePlayer(vector3df position,
f64 radius,
vector3df velocity,
f64 maxSpeed,
vector3df heading,
f64 mass,
vector3df scale,
f64 turnRate,
f64 maxForce,
s32 gameFieldID)
: BasePlayer(position, radius, velocity, maxSpeed, heading, mass, scale, turnRate, maxForce, PLAYER_ROLE_CHASER),
m_gameFieldID(gameFieldID),
m_pRushLine(null)
{
//
m_patrolPoints.clear();
// get ready state machine
m_pStateMachine = new StateMachine<FugitivePlayer>(this);
// start from nothing
m_pStateMachine->ChangeState(IdleFugitive::Instance());
// get ready sprite
ISceneManager* pSmgr = IrrDvc.GetSmgr();
IVideoDriver* pDriver = IrrDvc.GetDriver();
m_p2DSprite = pSmgr->addBillboardSceneNode();
m_p2DSprite->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
video::ITexture* pTexture = pDriver->getTexture("Rsrc/hero.tga");
// shkim, TODO.
// why should I grap this texture here? as a result, get(+1)->grab(+1)->drop(-1) will give reference count as 1.
// that means nobody know when I release texture after using at all. how do I figure it out?
// answer is, keeping texture resource during Proc life time. it means loading texture at Proc initializing time and releasing them at Proc releasing time.
// for doing that, need to use grab/drop pair after getTexture()
pTexture->grab();
m_p2DSprite->setMaterialTexture(0, pTexture);
m_p2DSprite->setMaterialFlag(video::EMF_LIGHTING, false);
m_p2DSprite->setMaterialFlag(video::EMF_ZBUFFER, true);
m_p2DSprite->setMaterialFlag(video::EMF_ZWRITE_ENABLE, true);
m_p2DSprite->setSize(dimension2df(scale.X, scale.Y));
m_p2DSprite->setPosition(position);
m_p2DSprite->setID(ID());
m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureScale(0.5f,0.5f);
m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureTranslate(0.f,0.5f); // 3th sprite
// rush line scene node
m_pRushLine = new RushLineSceneNode(pSmgr->getRootSceneNode(), pSmgr, ID(), this);
// set weapon
m_pWeapon[0] = new Pistol_Basic;
m_pWeapon[1] = new Mechine_Gun;
m_nCurrentWeaponNum = 0;
// center point(player pos) in screen coordinates for getting shooting direction
m_uPosinScreenCoord.X =(u32)(IrrDvc.GetDevice()->getVideoDriver()->getScreenSize().Width * 0.5f);
m_uPosinScreenCoord.Y =(u32)(IrrDvc.GetDevice()->getVideoDriver()->getScreenSize().Height * 0.5f);
}
示例7: newDocument
// newDocument
// new 3d scene document
void CDocument::newDocument()
{
ISceneManager *smgr = getIView()->getSceneMgr();
IrrlichtDevice *device = getIView()->getDevice();
// clear all history
CHistoryManager::getInstance()->clearAll();
// create design camera
m_designCamera = new CGameCamera();
m_designCamera->setName( L"Design camera" );
m_designCamera->setTarget(core::vector3df(300,100,300));
m_designCamera->setPosition( core::vector3df(0, 200, 0) );
getIView()->setActiveCamera( m_designCamera );
// add oxyz plane node
CGameOxyzSceneNode *oxyPlane = new CGameOxyzSceneNode( smgr->getRootSceneNode(), smgr, 1 );
m_gridNode = oxyPlane;
// add light
ISceneNode* pNode = smgr->addEmptySceneNode();
// default light
smgr->setAmbientLight( video::SColorf(0.2f, 0.2f, 0.2f ,1.0f) );
//ILightSceneNode *light = smgr->addLightSceneNode( pNode, core::vector3df(0, 0, 0) );
//light->setLightType( video::ELT_DIRECTIONAL );
// reset file path
m_filePath = L"";
// begin id
CGameObject::s_objectID = 1;
// add root
const WCHAR *lpRootName = L"level";
uiTreeView *pTreeview = getIView()->getDocumentTreeView();
m_treeViewRoot = pTreeview->addItem( (WCHAR*)lpRootName );
// create a zone
CZone *pZone = (CZone*)createZone();
getIView()->setCurrentZone( pZone );
getIView()->setObjectProperty( pZone );
m_treeViewRoot->expandChild( true );
// register draw all template obj
if ( s_isFirstDocument == true )
{
CObjTemplateFactory::registerDrawAllTemplateObject();
s_isFirstDocument = false;
}
// have 1 zone
m_totalObjects = 1;
}
示例8: CreateCamera
void CreateCamera(int width, int height, vector3df position, vector3df target)
{
//Build camera
ISceneManager* sm = g_GameGraph->GetSceneManager();
WorldState* worldState =
static_cast<WorldState*> (g_GameGraph->GetWorldState());
HexMap* hm = worldState->GetCurrentMap();
if (NULL != sm)
{
if (NULL != hm)
{
ICameraSceneNode* orthoCam = sm->addCameraSceneNode(
sm->getRootSceneNode(), position, target);
matrix4 projMat;
projMat.buildProjectionMatrixOrthoLH(width, height, -5, 5);
orthoCam->setProjectionMatrix(projMat, true);
orthoCam->bindTargetAndRotation(true);
if (orthoCam->isOrthogonal())
{
CameraAnimator* cameraAnim = new CameraAnimator(position, width,
height, hm->GetMapDimensions().Height,
hm->GetMapDimensions().Width, worldState->GetHero(),
hm->GetCoordinateTranslator());
orthoCam->addAnimator(cameraAnim);
cameraAnim->drop();
cameraAnim = NULL;
if (width > height)
{
LOGI("Creating a landscape camera.");
landscapeCamera = orthoCam;
}
else
{
LOGI("Creating a portrait camera");
portraitCamera = orthoCam;
}
}
else
{
LOGE("The created camera is not orthoganol, something is wrong with the perspective matrix.");
}
}
else
{
LOGE("The hex map created in the WorldState is NULL.");
}
}
else
{
LOGE("The scene manager cannot be loaded from the device.");
}
}
示例9: fread
// ----------------------------------------------------------------------------
IRoad::IRoad(ISceneNode* parent, ISceneManager* mgr, s32 id, FILE* fp)
:ISceneNode(parent, mgr, id)
{
u8 size;
c8* cc;
fread(&size, sizeof(u8), 1, fp);
if (size > 40)
{
m_valid = false;
return;
}
cc = new c8[size];
fread(cc, sizeof(c8), size, fp);
setName(cc);
delete[] cc;
fread(&m_closed, sizeof(bool), 1, fp);
fread(&m_detail, sizeof(f32), 1, fp);
fread(&m_width, sizeof(f32), 1, fp);
if ( m_detail < 0 || m_width < 0 || m_detail > MAX_DETAIL || m_width > MAX_WIDTH)
{
m_valid = false;
return;
}
stringw type;
wchar_t* c;
fread(&size, sizeof(u8), 1, fp);
c = new wchar_t[size];
fread(c, sizeof(wchar_t), size, fp);
type = c;
delete[] c;
ISceneManager* sm = Editor::getEditor()->getSceneManager();
if (type == L"TCR")
m_spline = new TCR(sm->getRootSceneNode(), sm, 0, fp);
else m_spline = new Bezier(sm->getRootSceneNode(), sm, 0, fp);
setAutomaticCulling(EAC_OFF);
m_valid = m_spline->isValid();
} // IRoad
示例10: createRoad
// ----------------------------------------------------------------------------
void Track::createRoad(stringw type, stringw name)
{
// Viewport::get()->setState(Viewport::SELECT);
IRoad* rm;
ISceneManager* sm = Editor::getEditor()->getSceneManager();
ISpline* spline;
if (type == L"Bezier")
{
spline = new Bezier(sm->getRootSceneNode(), sm, 0);
}
else spline = new TCR(sm->getRootSceneNode(), sm, 0);
rm = new Road(sm->getRootSceneNode(), sm, 0, spline, name);
Viewport::get()->roadBorn(rm);
m_roads.push_back(rm);
} // createRoad
示例11: initScene
void CIrrWindow::initScene()
{
IVideoDriver* driver = m_driver;
IrrlichtDevice* device = m_device;
ISceneManager* smgr = m_smgr;
// create texture manager
CTextureManager::createGetInstance();
// create design camera
m_designCamera = new CGameCamera();
m_designCamera->setName( L"Design camera" );
m_designCamera->setTarget(core::vector3df(0,0,0));
m_designCamera->setPosition( core::vector3df(-400, 200, -400) );
// set active camera
getIView()->setActiveCamera( m_designCamera );
// add oxyz plane node
CGameOxyzSceneNode *oxyPlane = new CGameOxyzSceneNode( smgr->getRootSceneNode(), smgr, 1 );
oxyPlane->drop();
// add light
ISceneNode* pNode = smgr->addEmptySceneNode();
// default light
ILightSceneNode *light = smgr->addLightSceneNode( pNode, core::vector3df(0, 0, 0) );
light->setLightType( video::ELT_DIRECTIONAL );
// add demo particle
m_particleObject = new CGameObject();
CParticleComponent *particleComp = new CParticleComponent(m_particleObject);
particleComp->initParticle();
m_particleObject->m_components.push_back( particleComp );
}
示例12: fopen
// ----------------------------------------------------------------------------
Track::Track(path file)
{
m_valid = true;
FILE* pFile;
pFile = fopen(file.c_str(), "rb");
if (!pFile)
{
m_valid = false;
stringw emsg = _("Editor failed to open file:\n \"");
emsg += file;
emsg += "\"";
MsgWndw::get()->showMsg(emsg);
return;
}
// SIGN
u64 sign;
fread(&sign, sizeof(u64), 1, pFile);
if (sign != TOP_SECRET_SIGNATURE_NUMBER)
{
MsgWndw::get()->showMsg(_("File can not be opened: signature failed."));
m_valid = false;
fclose(pFile);
return;
}
// TRACK NAME
u8 size;
wchar_t* c;
fread(&size, sizeof(u8), 1, pFile);
if (!Editor::isValidSize(size))
{
fclose(pFile); m_valid = false;
MsgWndw::get()->showMsg(_("File loading failed!"));
return;
}
c = new wchar_t[size];
fread(c, sizeof(wchar_t), size, pFile);
m_track_name = c;
delete[] c;
// DESIGNER NAME
fread(&size, sizeof(u8), 1, pFile);
if (!Editor::isValidSize(size))
{
fclose(pFile); m_valid = false;
MsgWndw::get()->showMsg(_("File loading failed!"));
return;
}
c = new wchar_t[size];
fread(c, sizeof(wchar_t), size, pFile);
m_designer = c;
delete[] c;
// FILE NAME
c8* cc;
fread(&size, sizeof(u8), 1, pFile);
if (!Editor::isValidSize(size))
{
fclose(pFile); m_valid = false;
MsgWndw::get()->showMsg(_("File loading failed!"));
return;
}
cc = new c8[size];
fread(cc, sizeof(c8), size, pFile);
m_file_name = cc;
delete[] cc;
// MUSIC
fread(&size, sizeof(u8), 1, pFile);
if (!Editor::isValidSize(size))
{
fclose(pFile); m_valid = false;
MsgWndw::get()->showMsg(_("File loading failed!"));
return;
}
cc = new c8[size];
fread(cc, sizeof(c8), size, pFile);
m_music = cc;
delete[] cc;
// TERRAIN
ISceneManager* sm = Editor::getEditor()->getSceneManager();
m_terrain = new Terrain(sm->getRootSceneNode(), sm, 1, pFile);
if (!m_terrain->isValid())
{
fclose(pFile);
MsgWndw::get()->showMsg(_("Loading failed :invalid terrain!"));
m_valid = false;
return;
}
// SKY
Sky* s = Viewport::get()->getSky();
delete s;
//.........这里部分代码省略.........
示例13: GLbody
GLbody *GLscene::addBody(OpenHRP::BodyInfo_var i_binfo)
{
ISceneManager* smgr = m_device->getSceneManager();
return new GLbody(smgr->getRootSceneNode(), smgr, -1, i_binfo);
}
示例14: main
int main()
{
int idCenario = 0;
int quadId;
vector3df p1, p2, p3, p4;
SMatrix mtxCenario;
CArquivoMatrizes *_fileMtx = new CArquivoMatrizes();
CSampleSceneNode *myQuad[2500];
CGerEventos eventos;
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600), 16, false,false,false, &eventos);
device->setWindowCaption(L"Editor de matrizes - Warbugs");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
smgr->addCameraSceneNodeFPS();
//smgr->addCameraSceneNode(0, vector3df(0,100,0), vector3df(0,0,0));
smgr->loadScene(pathCenario[idCenario]);
mtxCenario = _fileMtx->getMatrix(idCenario);
ITerrainSceneNode *sceneTerrain = (ITerrainSceneNode*)smgr->getSceneNodeFromType(ESNT_TERRAIN, 0);
ITriangleSelector *sceneTris = smgr->createTerrainTriangleSelector(sceneTerrain, 0);
sceneTerrain->setTriangleSelector(sceneTris);
for(int i=0; i<50; i++) // z
{
for(int j=0; j<50;j++) // x
{
//if(
//{
p1.X = 10.0;
p1.Y = 1.0;
p1.Z = 0.0;
p2.X = 10.0;
p2.Y = 1.0;
p2.Z = 500.0;
p3.X = 0.0;
p3.Y = 1.0;
p3.Z = 500.0;
p4.X = 0.0;
p4.Y = 1.0;
p4.Z = 0.0;
quadId = j + (i * 10);
myQuad[quadId] = new CSampleSceneNode(smgr->getRootSceneNode(), smgr, quadId, p1, p2, p3, p4);
//}
}
}
while(device->run())
{
driver->beginScene(true, true, SColor(0,100,100,100));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
示例15: mission
Ztunnel::Ztunnel(vector3df position,
double radius,
irr::core::vector3df velocity,
double maxSpeed,
irr::core::vector3df heading,
double mass,
irr::core::vector3df scale,
double turnRate,
double maxForce,
ZTUNNEL_TYPE initState,
u32 groupID,
BlackBoard* pbb)
: BasePlayer(position, radius, velocity, maxSpeed, heading, mass, scale, turnRate, maxForce, PLAYER_ROLE_DUMMY)
{
m_pStateMachine = new StateMachine<Ztunnel>(this);
// start from idle state
m_pStateMachine->SetCurrentState(IdleZtunnel::Instance());
// get ready sprite
#if USE_BILL_BOARD_SPRITE
ISceneManager* pSmgr = IrrDevice::GetInstance().GetSmgr();
m_p2DSprite = new BillBoard(pSmgr->getRootSceneNode(), pSmgr, 300);
m_p2DSprite->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
ITexture* pTexture = IrrDevice::GetInstance().GetDriver()->getTexture("Rsrc/hero.bmp");
m_p2DSprite->setMaterialTexture(0, pTexture);
m_p2DSprite->setMaterialFlag(video::EMF_LIGHTING, false);
m_p2DSprite->setMaterialFlag(video::EMF_ZBUFFER, false);
m_p2DSprite->setPosition(position);
m_p2DSprite->setID(0);
m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureScale(0.5f,0.5f);
#else
ISceneManager* pSmgr = IrrDvc.GetSmgr();
IVideoDriver* pDriver = IrrDvc.GetDriver();
m_p2DSprite = pSmgr->addBillboardSceneNode();
m_p2DSprite->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
//video::ITexture* pTexture = pDriver->getTexture("Rsrc/bullet.tga");
video::ITexture* pTexture = pDriver->getTexture("Rsrc/z_tunnel2.tga");
pTexture->grab();
m_p2DSprite->setMaterialTexture(0, pTexture);
m_p2DSprite->setMaterialFlag(video::EMF_LIGHTING, false);
m_p2DSprite->setMaterialFlag(video::EMF_ZBUFFER, true);
m_p2DSprite->setMaterialFlag(video::EMF_ZWRITE_ENABLE, true);
//m_p2DSprite->setSize(dimension2df(scale.X, scale.Y));
m_p2DSprite->setPosition(position);
m_p2DSprite->setID(ID());
// m_p2DSprite->getMaterial(0).getTextureMatrix(0).setTextureScale(0.5f,0.5f);
m_initState = initState;
#endif
// add into entity mamager
m_uGroupID = groupID;
//EntityMgr.RegisterEntity(m_uGroupID,this);//test code 지금은 그냥 1로 나중에 인자로 처리
//create skill
CreateBasicZSkill* pcreatebasicZskill = new CreateBasicZSkill("CreateBasicZ", this, 0.5);//name,baseplayer, prof
skills.insert(pair<std::string,Skill*>(pcreatebasicZskill->getName(), pcreatebasicZskill));
//create mission
pBlacBoard = pbb;
Mission mission("CreateBasicZ",1,1);
defendmezombieCreateMission = mission;
pBlacBoard->addMission(defendmezombieCreateMission);
}