private static void InitCustomDataNode() { VarBool isBind = new VarBool(false); DataNode.SetData(Constant.DataNode.IsWXBind, isBind); VarString v_userId = new VarString(""); DataNode.SetData(Constant.DataNode.UserId, v_userId); VarUInt v_score = new VarUInt(0); DataNode.SetData(Constant.DataNode.UserScore, v_score); }
private static void ScoreFields(VarBool first, VarBool second, ref int score, ref int maxScore) { if (first == VarBool.None) { return; } maxScore += 1; if (first == second) { score += 1; } }
public void Initialize() { Factory = new BDDNodeFactory(); Manager = new DDManager <BDDNode>(Factory, 16, gcMinCutoff: 4); QuantifiersSupported = true; this.Va = this.Manager.CreateBool(); this.Vb = this.Manager.CreateBool(); this.VarA = this.Manager.Id(this.Va); this.VarB = this.Manager.Id(this.Vb); }
protected override internal void OnEnter(ProcedureOwner procedureOwner) { base.OnEnter(procedureOwner); m_changeToLevel = false; m_changeToTileMap = false; m_changeToCineMachine = false; if (procedureOwner.GetData <VarBool>(Constant.ProcedureData.Gaming) != null && procedureOwner.GetData <VarBool>(Constant.ProcedureData.Gaming).Value) { GameEntry.UI.OpenUIForm(UIFormId.MapForm); return; } string deviceCode = GetDeviceCode(); GameEntry.WebRequestCB.GetDeviceBindList( PlatformDeviceBindRequest.Create( deviceCode, "nldmx"), (deviceBind) => { if (deviceBind.code == 0) { string userId = deviceBind.guest; if (deviceBind.userMap != null && deviceBind.userMap.Count > 0) { foreach (var kv in deviceBind.userMap) { //Debug.LogError(kv.Key + " " + kv.Value.uid); if (kv.Value.thridIds != null && kv.Value.thridIds.Count > 0) { foreach (var kkvv in kv.Value.thridIds) { if ("wx".Equals(kkvv.Key)) { VarBool isBind = new VarBool(true); GameEntry.DataNode.SetData(Constant.DataNode.IsWXBind, isBind); userId = kv.Value.uid; break; } } } } } VarString v_userId = new VarString(userId); GameEntry.DataNode.SetData(Constant.DataNode.UserId, v_userId); if ((bool)GameEntry.DataNode.GetData(Constant.DataNode.IsWXBind).GetValue()) { GameEntry.UI.OpenUIForm(UIFormId.MapForm); } else { GameEntry.UI.OpenUIForm(UIFormId.StageForm); } } else { Log.Error("获取绑定信息异常"); } }); }