public void OnChangeDropdown()
    {
        string selected = UIPopupList.current.value;

        //Create a message object to have the model execute
        ModifyLegacyEditorDataAction act = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        act.init("rightDropdown", selected);

        LegacyEditorData.instance.DoAction(act);
    }
    public void OnChangeDropdown()
    {
        string selected = UIPopupList.current.value;
        //Create a message object to have the model execute
        ModifyLegacyEditorDataAction act = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        act.init("subactionGroup", selected);
        act.addAdjacentProperty("currentSubaction", null);

        LegacyEditorData.instance.DoAction(act);
    }
    public void SetImageDef(ImageDefinition def)
    {
        imageDef   = def;
        label.text = def._imageName;
        ModifyLegacyEditorDataAction legacyAction = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        legacyAction.init("currentImageDef", def);
        legacyAction.enableDeselect();

        GetComponent <OnClickSendAction>().action = legacyAction;
    }
    public void SetImageFile(FileInfo file)
    {
        spriteFile = file;
        label.text = file.Name;
        ModifyLegacyEditorDataAction legacyAction = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        legacyAction.init("currentImageFile", file);
        legacyAction.enableDeselect();

        GetComponent <OnClickSendAction>().action = legacyAction;
    }
    public void SetAnimation(AnimationDefinition anim)
    {
        animationDefinition = anim;
        label.text          = anim.AnimationName;
        ModifyLegacyEditorDataAction legacyAction = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        legacyAction.init("currentAnimation", anim);
        legacyAction.enableDeselect();

        GetComponent <OnClickSendAction>().action = legacyAction;
    }
    public void SetSubaction(SubactionData subactionToSet)
    {
        subaction = subactionToSet;
        //label.text = subaction.SubactionName;
        label.text = subaction.ToString();
        ModifyLegacyEditorDataAction legacyAction = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        legacyAction.init("currentSubaction", subactionToSet);
        legacyAction.enableDeselect();

        GetComponent <OnClickSendAction>().action = legacyAction;
    }
示例#7
0
    public void OnChangeDropdown()
    {
        string selected = UIPopupList.current.value;

        //Create a message object to have the model execute
        ModifyLegacyEditorDataAction act = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        act.init("leftDropdown", selected);
        act.addAdjacentProperty("rightDropdown", LegacyEditorConstants.RightDropdownOptionsDict[selected][0]);

        LegacyEditorData.instance.DoAction(act);
    }
示例#8
0
    public void SetAction(DynamicAction actionToSet)
    {
        action     = actionToSet;
        label.text = actionToSet.name;
        ModifyLegacyEditorDataAction legacyAction = ScriptableObject.CreateInstance <ModifyLegacyEditorDataAction>();

        legacyAction.init("currentAction", actionToSet);
        legacyAction.enableDeselect(DynamicAction.NullAction);
        legacyAction.addAdjacentProperty("currentFrame", 0);
        legacyAction.addAdjacentProperty("currentSubaction", null);

        GetComponent <OnClickSendAction>().action = legacyAction;
    }