//=====================================================================================================================//
        //================================================== Editing Methods ==================================================//
        //=====================================================================================================================//

        #region Editing Methods

        private void ClearAllExcept(IGameEventTarget target)
        {
            if (target != _gameObjectTarget)
            {
                _gameObjectTarget = null;
            }

            if (target != _timelineTarget)
            {
                _timelineTarget = null;
            }

            if (target != _eventTarget)
            {
                _eventTarget = null;
            }

            if (target != _animatorTarget)
            {
                _animatorTarget = null;
            }

            if (target != _behaviourTarget)
            {
                _behaviourTarget = null;
            }
        }
Beispiel #2
0
        //=====================================================================================================================//
        //=================================================== Public Methods ==================================================//
        //=====================================================================================================================//

        #region Public Methods

        public static EventIDTarget Clone(EventIDTarget original)
        {
            if (original == null)
            {
                return(null);
            }

            var newTarget = new EventIDTarget {
                action    = original.action,
                eventID   = original.eventID,
                delay     = original.delay,
                allOfType = original.allOfType,
                parameter = CallbackParameter.Clone(original.parameter)
            };

            return(newTarget);
        }
        //=====================================================================================================================//
        //=================================================== Public Methods ==================================================//
        //=====================================================================================================================//

        #region Public Methods

        public static GameEventTarget Clone(GameEventTarget original)
        {
            if (original == null)
            {
                return(null);
            }

            var newTarget = new GameEventTarget {
                _targetType = original._targetType,

                _animatorTarget   = AnimatorTarget.Clone(original._animatorTarget),
                _behaviourTarget  = BehaviourTarget.Clone(original._behaviourTarget),
                _eventTarget      = EventIDTarget.Clone(original._eventTarget),
                _gameObjectTarget = GameObjectTarget.Clone(original._gameObjectTarget),
                _timelineTarget   = TimelineTarget.Clone(original._timelineTarget),

                _replayOnLoad = original._replayOnLoad,
                _isMuted      = original._isMuted
            };

            return(newTarget);
        }