public override void Analysis(string value) { string methodName; string[] arguments; Analysis(value, out methodName, out arguments); if (!funList.ContainsKey(methodName)) { base.Analysis(value); return; } Dictionary <string, List <string> > funArr = funList[methodName]; List <string> paramList = funArr["param"]; for (int i = 0; i < paramList.Count; i++) { LSharpVarlable.SetVarlable(paramList[i], arguments[i]); } List <string> funLineList = funArr["function"]; foreach (string line in funLineList) { LSharpScript.Instance.UnshiftLine(line); } LSharpScript.Instance.Analysis(); }
public void UpdatePlayer() { App.Model.MCharacter mCharacter = System.Array.Find(Global.SUser.self.characters, c => c.CharacterId >= App.Util.Global.Constant.user_characters[0]); LSharpVarlable.SetVarlable("player_character_id", mCharacter.CharacterId.ToString()); LSharpVarlable.SetVarlable("player_id", Global.SUser.self.id.ToString()); LSharpVarlable.SetVarlable("player_name", Global.SUser.self.name); LSharpVarlable.SetVarlable("player_nickname", Global.SUser.self.Nickname); LSharpVarlable.SetVarlable("player_claim", Language.Get(string.Format("player_claim_{0}", mCharacter.Gender.ToString()))); LSharpVarlable.SetVarlable("player_claim_called", Language.Get(string.Format("player_claim_called_{0}", mCharacter.Gender.ToString()))); }
public void UpdateBattleList() { if (Global.SUser.self == null) { return; } foreach (App.Model.MBattleChild mBattleChild in Global.SUser.self.battlelist) { LSharpVarlable.SetVarlable(string.Format("battlefield_{0}", mBattleChild.BattlefieldId), "1"); } }
public void UpdateVarList() { if (Global.SUser.self.Progress != null) { Dictionary <string, int> progress = Global.SUser.self.Progress; foreach (string k in progress.Keys) { LSharpVarlable.SetVarlable(k, progress[k].ToString()); } } }