示例#1
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        Modelable model = _copiedObj.GetComponent <Modelable>();

        if (model)
        {
            model.SetAsSelected();
        }

        // undo redo
        ICommand copyAction = new CommandCreateCopy(_copiedObj.gameObject, _data);

        UndoRedoManager.AddNewAction(copyAction);
    }
示例#2
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        //Debug.Log("EXITING CREATION MENU SELECTED STATE");

        Modelable model = m_prim.gameObject.GetComponent <Modelable>();

        if (model)
        {
            model.SetAsSelected();
        }

        // undo redo
        ICommand createAction = new CommandCreateCopy(m_prim.gameObject, m_data);

        UndoRedoManager.AddNewAction(createAction);

        animator.SetBool(m_hash_itemSelectedBool, false);
        m_prim = null;
    }