Beispiel #1
0
    public void OnDestroy()
    {
        _fileName = string.Empty;
        EditorPrefs.DeleteKey("HsmFile");

        hSMChangeSelectId            -= ChangeSelectId;
        hSMAddState                  -= AddNode;
        hSMDeleteNode                -= DeleteNode;
        hSMSetDefaultState           -= SetDefaultState;
        hSMLoadFile                  -= LoadFile;
        hSMSaveFile                  -= SaveFile;
        hSMDeleteFile                -= DeleteFile;
        hSMNodeChangeTransition      -= NodeChangeTransition;
        hSMNodeAddDelParameter       -= NodeAddDelParameter;
        hSMNodeTransitionAddDelGroup -= NodeTransitionAddDelGroup;
        parameterChange              -= ParameterChange;
        hSMNodeChangeParameter       -= NodeChangeParameter;
        hSMRuntimePlay               -= RuntimePlay;
        hSMChangeSelectTransitionId  += ChangeSelectTransition;
        hsmOpenSubMachine            -= OpenSubMachine;

        _playState = HSMPlayType.STOP;

        AssetDatabase.Refresh();
        UnityEngine.Caching.ClearCache();
    }
Beispiel #2
0
    public void Init()
    {
        CreateData();

        hSMChangeSelectId            += ChangeSelectId;
        hSMAddState                  += AddNode;
        hSMDeleteNode                += DeleteNode;
        hSMSetDefaultState           += SetDefaultState;
        hSMLoadFile                  += LoadFile;
        hSMSaveFile                  += SaveFile;
        hSMDeleteFile                += DeleteFile;
        hSMNodeChangeTransition      += NodeChangeTransition;
        hSMNodeAddDelParameter       += NodeAddDelParameter;
        hSMNodeTransitionAddDelGroup += NodeTransitionAddDelGroup;
        parameterChange              += ParameterChange;
        hSMNodeChangeParameter       += NodeChangeParameter;
        hSMRuntimePlay               += RuntimePlay;
        hSMChangeSelectTransitionId  += ChangeSelectTransition;
        hsmOpenSubMachine            += OpenSubMachine;

        _playState = HSMPlayType.STOP;
    }