private void UploadArrayList()
        {
            if (!isProxyValid())
            {
                return;
            }


            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/arraylist/" + reference.Value;
            }

            List <string> _list = new List <string>();

            foreach (object item in proxy.arrayList)
            {
                _list.Add(PlayMakerUtils.ParseValueToString(item));
            }

            //ES2.Save<string>(_list, saveFile.Value+"?tag="+uniqueTag);


            web = new ES2Web(urlToPHPFile + "?tag=" + _tag + "&webfilename=" + saveFile.Value + "&webpassword="******"&webusername="******"Uploading to " + urlToPHPFile.Value + "?tag=" + _tag + "&webfilename=" + saveFile.Value);
        }
Example #2
0
        private void UploadHashTable()
        {
            if (!isProxyValid())
            {
                return;
            }


            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/hashTable/" + reference.Value;
            }

            Dictionary <string, string> _dict = new Dictionary <string, string>();


            foreach (object key in proxy.hashTable.Keys)
            {
                _dict[(string)key] = PlayMakerUtils.ParseValueToString(proxy.hashTable[key]);
            }


            web = new ES2Web(urlToPHPFile + "?tag=" + _tag + "&webfilename=" + saveFile.Value + "&webpassword="******"&webusername="******"Uploading to " + urlToPHPFile.Value + "?tag=" + _tag + "&webfilename=" + saveFile.Value);
        }
Example #3
0
        public void SaveArrayList()
        {
            if (!isProxyValid())
            {
                return;
            }

            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/arraylist/" + reference;
            }

            List <string> _list = new List <string>();

            foreach (object item in proxy.arrayList)
            {
                _list.Add(PlayMakerUtils.ParseValueToString(item));
            }

            ES2.Save <string>(_list, saveFile.Value + "?tag=" + uniqueTag);

            Log("Saved to " + saveFile.Value + "?tag=" + uniqueTag);
            Finish();
        }
Example #4
0
        public void SaveHashTable()
        {
            if (!isProxyValid())
            {
                return;
            }

            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/hashTable/" + reference;
            }


            Dictionary <string, string> _dict = new Dictionary <string, string>();


            foreach (object key in proxy.hashTable.Keys)
            {
                _dict[(string)key] = PlayMakerUtils.ParseValueToString(proxy.hashTable[key]);
            }


            ES2.Save(_dict, saveFile.Value + "?tag=" + _tag);


            Log("Saved to " + saveFile.Value + "?tag=" + _tag);

            Finish();
        }
Example #5
0
    static public object GetParseValueFromFsmVar(Fsm fsm, FsmVar fsmVar)
    {
        PlayMakerUtils.RefreshValueFromFsmVar(fsm, fsmVar);

        if (fsmVar.Type == VariableType.Bool)
        {
            return(fsmVar.boolValue);
        }
        else if (fsmVar.Type == VariableType.Float)
        {
            return(fsmVar.floatValue);
        }
        else if (fsmVar.Type == VariableType.Int)
        {
            return(fsmVar.intValue);
        }
        else if (fsmVar.Type == VariableType.String)
        {
            return(fsmVar.stringValue);
        }
        else if (fsmVar.Type == VariableType.Color)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.colorValue));
        }
        else if (fsmVar.Type == VariableType.GameObject)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.gameObjectValue));
        }
        else if (fsmVar.Type == VariableType.Material)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.materialValue));
        }
        else if (fsmVar.Type == VariableType.Quaternion)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.quaternionValue));
        }
        else if (fsmVar.Type == VariableType.Rect)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.rectValue));
        }
        else if (fsmVar.Type == VariableType.Texture)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.textureValue));
        }
        else if (fsmVar.Type == VariableType.Vector2)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.vector2Value));
        }
        else if (fsmVar.Type == VariableType.Vector3)
        {
            return(PlayMakerUtils.ParseValueToString(fsmVar.vector3Value));
        }

        return(false);
    }
Example #6
0
    static public bool SetParsePropertyFromFsmVar(ParseObject _object, string property, Fsm fsm, FsmVar fsmVar)
    {
        if (_object == null)
        {
            Debug.Log("Parse Object null");
            return(false);
        }

        if (string.IsNullOrEmpty(property))
        {
            Debug.Log("property null");
            return(false);
        }

        if (!_object.ContainsKey(property))
        {
            //	return false;
        }

        PlayMakerUtils.RefreshValueFromFsmVar(fsm, fsmVar);


        if (fsmVar.Type == VariableType.Bool)
        {
            _object[property] = fsmVar.boolValue;
        }
        else if (fsmVar.Type == VariableType.Float)
        {
            _object[property] = fsmVar.floatValue;
        }
        else if (fsmVar.Type == VariableType.Int)
        {
            _object[property] = fsmVar.intValue;
        }
        else if (fsmVar.Type == VariableType.String)
        {
            _object[property] = fsmVar.stringValue;
        }
        else if (fsmVar.Type == VariableType.Color)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.colorValue);
        }
        else if (fsmVar.Type == VariableType.GameObject)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.gameObjectValue);
        }
        else if (fsmVar.Type == VariableType.Material)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.materialValue);
        }
        else if (fsmVar.Type == VariableType.Quaternion)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.quaternionValue);
        }
        else if (fsmVar.Type == VariableType.Rect)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.rectValue);
        }
        else if (fsmVar.Type == VariableType.Texture)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.textureValue);
        }
        else if (fsmVar.Type == VariableType.Vector2)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.vector2Value);
        }
        else if (fsmVar.Type == VariableType.Vector3)
        {
            _object[property] = PlayMakerUtils.ParseValueToString(fsmVar.vector3Value);
        }

        return(true);
    }