protected override GUIFSM <AnimationBox> CreateFSM() { var idle = new Idle(); idle.AddTransition(GUIEventID.MouseEnter, 1); idle.AddTransition(GUIEventID.FocusGained, 2); var hover = new AnimUpdate(); hover.AddTransition(GUIEventID.MouseExit, 0); hover.AddTransition(GUIEventID.FocusGained, 3); var focus = new AnimUpdate(); focus.AddTransition(GUIEventID.FocusLost, 0); focus.AddTransition(GUIEventID.MouseEnter, 3); var focusH = new AnimUpdate(); focusH.AddTransition(GUIEventID.FocusLost, 1); focusH.AddTransition(GUIEventID.MouseExit, 2); return(new GUIFSM <AnimationBox>(this, new GUIState <AnimationBox>[] { idle, hover, focus, focusH })); }
void Awake() { OnTombUpdate += UpdateTombAnim; }