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); } }