Example #1
0
        public JObject ToJson()
        {
            JObject json = new JObject();

            json["operation_statuses"]        = OperationStatuses.Select(p => p.ToJson()).ToArray();
            json["operation_types"]           = OperationTypes.Select(p => new JString(p)).ToArray();
            json["errors"]                    = Errors.Select(p => p.ToJson()).ToArray();
            json["historical_balance_lookup"] = new JBoolean(HistoricalBalanceLookup);
            if (TimestampStartIndex >= 0)
            {
                json["timestamp_start_index"] = TimestampStartIndex;
            }
            json["call_methods"]      = CallMethods.Select(p => new JString(p)).ToArray();
            json["balance_exemption"] = BalanceExemptions.Select(p => p.ToJson()).ToArray();
            json["mempool_coins"]     = new JBoolean(MempoolCoins);
            return(json);
        }
Example #2
0
    void OnEnable()
    {
        // Setup the SerializedProperties.
        SeeInspector = serializedObject.FindProperty("SeeInspector");

        methodsList = serializedObject.FindProperty("methodsList");
        moreOptions = serializedObject.FindProperty("moreOptions");
        //b_isObjectActivated = serializedObject.FindProperty ("moreOptions");
        //isObjectActivatedIndex = serializedObject.FindProperty ("isObjectActivatedIndex");

        editorMethods   = new EditorMethods();
        callMethods     = new CallMethods();
        _manipulateSave = new manipulateSave();

        Tex_01 = MakeTex(2, 2, new Color(.9f, .9f, 0.9F, 1f));
        Tex_02 = MakeTex(2, 2, new Color(1, .8f, 0.2F, .4f));
        Tex_03 = MakeTex(2, 2, new Color(.3F, .9f, 1, .5f));
        Tex_04 = MakeTex(2, 2, new Color(1, .3f, 1, .3f));
        Tex_05 = MakeTex(2, 2, new Color(1, .5f, 0.3F, .4f));

        SaveData myScript = (SaveData)target;

        if (methodsList.arraySize == 0)
        {
            serializedObject.Update();
            editorMethods.AddMethodsToList(methodsList);


            methodsList.GetArrayElementAtIndex(0).FindPropertyRelative("obj").objectReferenceValue   = myScript.gameObject;
            methodsList.GetArrayElementAtIndex(0).FindPropertyRelative("methodInfoName").stringValue = "ReturnSaveData";

            serializedObject.ApplyModifiedProperties();

            myScript.methodsList[0].indexScript =
                myScript.methodsList[0].obj.GetComponents <MonoBehaviour> ().Length;
        }
    }