public void createNPC(lgGDBase npcCtrl) { createSceneObjectPair( npcCtrl, OBJECT_NAME_DEF.SCENE_NPC_CTRL, OBJECT_NAME_DEF.SCENE_NPC_DRAW ); }
public void createMonster(lgGDBase monsterCtrl) { createSceneObjectPair( monsterCtrl, OBJECT_NAME_DEF.SCENE_MONSTER_CTRL, OBJECT_NAME_DEF.SCENE_MONSTER_DRAW ); }
public void createHero(lgGDBase heroCtrl) { createSceneObjectPair( heroCtrl, OBJECT_NAME_DEF.SCENE_HERO_CTRL, OBJECT_NAME_DEF.SCENE_HERO_DRAW ); }
public void createOtherPlayer(lgGDBase otherPlayerCtrl) { createSceneObjectPair( otherPlayerCtrl, OBJECT_NAME_DEF.SCENE_OTHER_PLAY_CTRL, OBJECT_NAME_DEF.SCENE_OTHER_PLAY_DRAW ); }
public void createCamera(lgGDBase cameraCtrl) { createSceneObjectPair( cameraCtrl, OBJECT_NAME_DEF.SCENE_CAMERA_CTRL, OBJECT_NAME_DEF.SCENE_CAMERA_DRAW ); }
//public void createAvatarObject(lgGDBase avatarCtrl) //{ // //createSceneObjectPair( mapCtrl, OBJECT_NAME_DEF.SCENE_MAP_CTRL, OBJECT_NAME_DEF.SCENE_MAP_DRAW ); //} public void createMainAvatarObject(lgGDBase avatarCtrl) { createSceneObjectPair( avatarCtrl, OBJECT_NAME_DEF.SCENE_MAIN_PLAY_CTRL, OBJECT_NAME_DEF.SCENE_MAIN_PLAY_DRAW ); }
//======== public void createMapObject(lgGDBase mapCtrl) { createSceneObjectPair( mapCtrl, OBJECT_NAME_DEF.SCENE_MAP_CTRL, OBJECT_NAME_DEF.SCENE_MAP_DRAW ); }
private void createSceneObjectPair(lgGDBase mapCtrl, string ctrlName, string drawName) { LGGRBaseImpls lGGRBaseImpls = base.createInst(ctrlName, false) as LGGRBaseImpls; GRBaseImpls gRBaseImpls = base.createInst(drawName, false) as GRBaseImpls; bool flag = lGGRBaseImpls == null; if (flag) { DebugTrace.print("GRClient create ctrlName[" + ctrlName + "] null!"); } else { bool flag2 = gRBaseImpls == null; if (flag2) { DebugTrace.print("GRClient create drawName[" + drawName + "] null!"); } else { mapCtrl.initGr(gRBaseImpls, lGGRBaseImpls); gRBaseImpls.initLg(mapCtrl); lGGRBaseImpls.init(); gRBaseImpls.init(); lGGRBaseImpls.setGameCtrl(mapCtrl); lGGRBaseImpls.setDrawBase(gRBaseImpls); gRBaseImpls.setSceneCtrl(lGGRBaseImpls); bool flag3 = "SCENE_MAIN_PLAY_CTRL" == ctrlName; if (flag3) { base.g_processM.addRender(lGGRBaseImpls, true); base.g_processM.addRender(gRBaseImpls, true); } else { base.g_processM.addRender(lGGRBaseImpls, false); base.g_processM.addRender(gRBaseImpls, false); } } } }
private void createSceneObjectPair(lgGDBase mapCtrl, string ctrlName, string drawName) { LGGRBaseImpls sctrl = createInst(ctrlName, false) as LGGRBaseImpls; GRBaseImpls dbase = createInst(drawName, false) as GRBaseImpls; if (sctrl == null) { DebugTrace.print("GRClient create ctrlName[" + ctrlName + "] null!"); return; } if (dbase == null) { DebugTrace.print("GRClient create drawName[" + drawName + "] null!"); return; } mapCtrl.initGr(dbase, sctrl); dbase.initLg(mapCtrl); sctrl.init(); dbase.init(); sctrl.setGameCtrl(mapCtrl); sctrl.setDrawBase(dbase); dbase.setSceneCtrl(sctrl); if (OBJECT_NAME_DEF.SCENE_MAIN_PLAY_CTRL == ctrlName) { this.g_processM.addRender(sctrl, true); this.g_processM.addRender(dbase, true); } else { this.g_processM.addRender(sctrl); this.g_processM.addRender(dbase); } }
public void createHero(lgGDBase heroCtrl) { this.createSceneObjectPair(heroCtrl, "SCENE_HERO_CTRL", "SCENE_HERO_DRAW"); }
public void createOtherPlayer(lgGDBase otherPlayerCtrl) { this.createSceneObjectPair(otherPlayerCtrl, "SCENE_OTHER_PLAY_CTRL", "SCENE_OTHER_PLAY_DRAW"); }
public void createMonster(lgGDBase monsterCtrl) { this.createSceneObjectPair(monsterCtrl, "SCENE_MONSTER_CTRL", "SCENE_MONSTER_DRAW"); }
public void createCamera(lgGDBase cameraCtrl) { this.createSceneObjectPair(cameraCtrl, "SCENE_CAMERA_CTRL", "SCENE_CAMERA_DRAW"); }
public void createMainAvatarObject(lgGDBase avatarCtrl) { this.createSceneObjectPair(avatarCtrl, "SCENE_MAIN_PLAY_CTRL", "SCENE_MAIN_PLAY_DRAW"); }
public void createMapObject(lgGDBase mapCtrl) { this.createSceneObjectPair(mapCtrl, "SCENE_MAP_CTRL", "SCENE_MAP_DRAW"); }
public virtual void initLg(lgGDBase lgbase) { }
public void createNPC(lgGDBase npcCtrl) { this.createSceneObjectPair(npcCtrl, "SCENE_NPC_CTRL", "SCENE_NPC_DRAW"); }
public void setGameCtrl(lgGDBase gct) { m_gameCtrl = gct; onSetGameCtrl(); }
public void setGameCtrl(lgGDBase gct) { this.m_gameCtrl = gct; this.onSetGameCtrl(); }