示例#1
0
        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);
                }
            }
        }
示例#2
0
        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);
        }
示例#3
0
 public void SetList(SRList srl)
 {
     prevList    = currentList;
     currentList = srl;
     currentList.ReadFocus();
 }