void LoadVariables() { store = gameObject.GetComponent <VariablesStore>(); Debug.Log(store.file); string[] hiScore = store.file.Split(';'); if (!uint.TryParse(hiScore[0], out localHiScore)) { Debug.Log("could not parse hi score"); } if (!ushort.TryParse(hiScore[1], out localHiScoreBestCombo)) { Debug.Log("could not parse best combo"); } if (!uint.TryParse(hiScore[2], out localHiScoreBestChain)) { Debug.Log("could not parse best chain"); } if (FBProfilePic != null) { FBProfilePic.text = "Local Hi Score \r\n" + localHiScore.ToString() + "\r\nBest Combo : " + localHiScoreBestCombo.ToString() + "\r\nBest Chain : " + localHiScoreBestChain.ToString(); } if (localHiScoreText != null) { localHiScoreText.text = localHiScore.ToString();; } }
protected override IEnumerable <ParameterExpression> ExtractParameters() { return(Declaration.Parameters .Select(p => p.AcceptVisitor(Visitor, this).Reduce()) .Cast <ParameterExpression>() .Select(p => { VariablesStore.Add(p.Name, new Variable(p)); return p; }) .ToList()); }
public void SetGlobalVariable() { var store = new VariablesStore(); var value = Expression.Constant("hello"); store.CreateLocalVariables(); //store.SetGlobalVariable("aa", value); //Assert.IsNotNull(store.AvailableVarialbes["aa"]); //Assert.IsNull(store.LocalVariables["aa"]); //Assert.IsNotNull(store.GlobalVariables["aa"]); }
protected virtual bool TryFind(string name, out ParameterExpression expression) { Variable variable; if (VariablesStore.TryGetValue(name, out variable)) { expression = variable.Expression; return(true); } expression = null; return(false); }
public async Task UpdateVariableContent(string parent, string name, object content) { //string contentString = null; //switch (content) //{ // case String str: // { // contentString = content.ToString(); // break; // } // default: // { // contentString = Converter.Json.ToJson(content); // break; // } //} await VariablesStore.UpdateVariableContent(parent, name, content); }
public async Task RemoveVariable(string parent, string name) { await VariablesStore.RemoveVariable(parent, name); }
public async Task CreateVariable(TreeNode variable) { await VariablesStore.CreateVariable(variable); }
public async Task <TreeNode> GetVariable(string parent, string name) { return(await VariablesStore.GetVariableAsync(parent, name)); }
public async Task RenameFolder(string parent, string oldName, string newName) { await VariablesStore.RenameFolder(parent, oldName, newName); }
public async Task NewFolder(string parent, string name) { await VariablesStore.NewFolder(parent, name); }
public async Task <List <TreeNode> > GetVariablesInParent(string parent) { return(await VariablesStore.GetVariablesInParent(parent)); }
public async Task <object> GetFolderTree() { var tree = await VariablesStore.GetFolderTree(); return(tree); }
protected virtual bool TryFind(string name, out Variable variableData) { return(VariablesStore.TryGetValue(name, out variableData)); }