Ejemplo n.º 1
0
 public void OnAction()
 {
     //Convert this to a LegacyAction
     if (panel.varData.type == SubactionVarType.BOOL && panel.varData.source == SubactionSource.CONSTANT)
     {
         ChangeSubactionVarDataInput legacyAction = ScriptableObject.CreateInstance <ChangeSubactionVarDataInput>();
         legacyAction.init(panel.varData, checkbox.value.ToString().ToLower());
         LegacyEditorData.instance.DoAction(legacyAction);
     }
 }
    public void changedValue(string newVal)
    {
        //Because this window will only ever be visible when a create hitbox subaction is selected, we just need to get the current subaction.
        SubactionData    createHitboxSubaction = editor.currentSubaction;
        SubactionVarData varData = createHitboxSubaction.arguments[varDataName];

        //Convert this to a LegacyAction
        ChangeSubactionVarDataInput legacyAction = ScriptableObject.CreateInstance <ChangeSubactionVarDataInput>();

        legacyAction.init(varData, newVal);

        LegacyEditorData.instance.DoAction(legacyAction);
        input.value = varData.data;
    }
    public void OnAction(string inputData)
    {
        //If we aren't accepting inputs yet, don't.
        if (!ready)
        {
            return;
        }

        //If we have a filter object, make sure to filter the incoming text before we do anything with it.
        if (filter != null)
        {
            inputData = filter.filterText(inputData);
        }

        //Convert this to a LegacyAction
        ChangeSubactionVarDataInput legacyAction = ScriptableObject.CreateInstance <ChangeSubactionVarDataInput>();

        legacyAction.init(panel.varData, inputData);

        LegacyEditorData.instance.DoAction(legacyAction);
        input.value = panel.varData.data;
    }