public void addTitleSpr(string tp, Variant titleConf, int showtp = 0, Variant showInfo = null) { Variant variant = this._titleSprites[tp]; bool flag = variant == null; if (flag) { bool flag2 = titleConf == null; if (flag2) { return; } variant = new Variant(); variant["conf"] = titleConf; variant["sprs"] = new Variant(); variant["sprs"]._val = new Dictionary <string, Variant>(); this._titleSprites[tp] = variant; } Variant variant2 = variant["conf"]["show"][showtp.ToString()]; bool flag3 = variant2 != null && false; if (flag3) { _graphChaSprite graphChaSprite = _graphChaSpriteHost.createChaSprite(variant2["tp"]); bool flag4 = showInfo == null; if (flag4) { showInfo = new Variant(); } this._adjustShowInfo(variant2, showInfo); bool flag5 = variant["sprs"].ContainsKey(showtp.ToString()); if (flag5) { this.removeTitleSpr(tp, showtp, true); } graphChaSprite.userdata = GameTools.createGroup(new Variant[] { "tp", tp, "showtp", showtp, "conf", variant["conf"] }); variant["sprs"][showtp.ToString()] = GameTools.createGroup(new object[] { "spr", graphChaSprite, "add", false }); graphChaSprite.initShowInfo(showInfo, new Action <_graphChaSprite>(this.initTitleFinish)); } }
public void InitDpSpr(Variant conf, Action initCB) { this._initDpCallBack = initCB; this._dpNum = conf["show"].Count; foreach (Variant current in conf["show"].Values) { _graphChaSprite graphChaSprite = _graphChaSpriteHost.createChaSprite(current["tp"]); this._dpInfo[current["layer"]] = GameTools.createGroup(new object[] { "spr", graphChaSprite }); this._dpInfo[current["layer"]]["info"] = current; bool flag = "txt" == current["tp"]; if (flag) { Variant variant = current.clone(); bool flag2 = current.ContainsKey("style"); if (flag2) { variant["style"] = _graphChaSpriteHost.GetDisplayStyle(current["style"]); } Variant variant2 = new Variant(); bool flag3 = current.ContainsKey("fmt"); if (flag3) { GameTools.mergeSimpleObject(current["fmt"][0], variant2, false, true); } variant["fmt"] = variant2; graphChaSprite.initShowInfo(variant, new Action <_graphChaSprite>(this.initDpSprFin)); } else { graphChaSprite.initShowInfo(current, new Action <_graphChaSprite>(this.initDpSprFin)); } } }