private void OnStateMachineTransitioned(StateMachine <TState, TTrigger> .Transition transition) { _transTime = Time.realtimeSinceStartup; #if UNITY_EDITOR _prevState = transition.Source; _prevTrigger = transition.Trigger; #endif if (_eventListeners != null && _eventListeners.Count > 0) { for (var i = 0; i < _eventListeners.Count; ++i) { _eventListeners[i](this, transition.Source, transition.Destination); } } }
public void OnBeforeSerialize() { if (_keys == null) { _keys = new SRList <TKey>(_internalDict.Count); } if (_values == null) { _values = new SRList <TValue>(_internalDict.Count); } _keys.Clear(true); _values.Clear(true); _keys.AddRange(_internalDict.Keys); _values.AddRange(_internalDict.Values); }
public void SetList(SRList srl) { prevList = currentList; currentList = srl; currentList.ReadFocus(); }