//=====================================================================================================================// //================================================== 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; } }
//=====================================================================================================================// //=================================================== Public Methods ==================================================// //=====================================================================================================================// #region Public Methods public static AnimatorTarget Clone(AnimatorTarget original) { if (original == null) { return(null); } var newTarget = new AnimatorTarget { animator = original.animator, action = original.action, //SetParameter values parameterType = original.parameterType, parameterName = original.parameterName, integerValue = original.integerValue, floatValue = original.floatValue, booleanValue = original.booleanValue, //Crossfade & Play values targetState = original.targetState, transitionDuration = original.transitionDuration, targetStateOffset = original.targetStateOffset, targetStateName = original.targetStateName, //MatchTarget values matchTarget = original.matchTarget, avatarTarget = original.avatarTarget, weightMaskPositionWeight = original.weightMaskPositionWeight, weightMaskRotationWeight = original.weightMaskRotationWeight, startTime = original.startTime, endTime = original.endTime, //SetIK values avatarIkGoal = original.avatarIkGoal, ikPositionRef = original.ikPositionRef, ikPositionWeight = original.ikPositionWeight, ikRotationRef = original.ikRotationRef, ikRotationWeight = original.ikRotationWeight, lookAtRef = original.lookAtRef, lookAtWeight = original.lookAtWeight, bodyWeight = original.bodyWeight, headWeight = original.headWeight, eyesWeight = original.eyesWeight, clampWeight = original.clampWeight, //SetLayerWeight values targetLayer = original.targetLayer, targetLayerName = original.targetLayerName, layerWeight = original.layerWeight }; return(newTarget); }
//=====================================================================================================================// //=================================================== Public Methods ==================================================// //=====================================================================================================================// #region Public Methods public static AnimatorTarget Clone(AnimatorTarget original) { if (original == null) { return(null); } var newTarget = new AnimatorTarget { animator = original.animator, action = original.action, parameterType = original.parameterType, parameterName = original.parameterName, integerValue = original.integerValue, floatValue = original.floatValue, booleanValue = original.booleanValue }; 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); }