Пример #1
0
        // ***********************************************************************************
        // INIT
        // ***********************************************************************************

        /// <summary>
        /// Initializes the given owner with the stored parameters.
        /// </summary>
        /// <param name="p_owner">
        /// The <see cref="ABSTweenComponent"/> to initialize.
        /// </param>
        protected void InitializeOwner(ABSTweenComponent p_owner)
        {
            p_owner._id    = id;
            p_owner._intId = intId;
            p_owner._autoKillOnComplete = autoKillOnComplete;
            p_owner._updateType         = updateType;
            p_owner._timeScale          = timeScale;
            p_owner._loops    = loops;
            p_owner._loopType = loopType;
            p_owner._isPaused = isPaused;

            p_owner.onStart               = onStart;
            p_owner.onStartWParms         = onStartWParms;
            p_owner.onStartParms          = onStartParms;
            p_owner.onUpdate              = onUpdate;
            p_owner.onUpdateWParms        = onUpdateWParms;
            p_owner.onUpdateParms         = onUpdateParms;
            p_owner.onPluginUpdated       = onPluginUpdated;
            p_owner.onPluginUpdatedWParms = onPluginUpdatedWParms;
            p_owner.onPluginUpdatedParms  = onPluginUpdatedParms;
            p_owner.onPause               = onPause;
            p_owner.onPauseWParms         = onPauseWParms;
            p_owner.onPauseParms          = onPauseParms;
            p_owner.onPlay               = onPlay;
            p_owner.onPlayWParms         = onPlayWParms;
            p_owner.onPlayParms          = onPlayParms;
            p_owner.onRewinded           = onRewinded;
            p_owner.onRewindedWParms     = onRewindedWParms;
            p_owner.onRewindedParms      = onRewindedParms;
            p_owner.onStepComplete       = onStepComplete;
            p_owner.onStepCompleteWParms = onStepCompleteWParms;
            p_owner.onStepCompleteParms  = onStepCompleteParms;
            p_owner.onComplete           = onComplete;
            p_owner.onCompleteWParms     = onCompleteWParms;
            p_owner.onCompleteParms      = onCompleteParms;

            p_owner.manageBehaviours      = manageBehaviours;
            p_owner.manageGameObjects     = manageGameObjects;
            p_owner.managedBehavioursOn   = managedBehavioursOn;
            p_owner.managedBehavioursOff  = managedBehavioursOff;
            p_owner.managedGameObjectsOn  = managedGameObjectsOn;
            p_owner.managedGameObjectsOff = managedGameObjectsOff;
            if (manageBehaviours)
            {
                int len = (managedBehavioursOn != null ? managedBehavioursOn.Length : 0) + (managedBehavioursOff != null ? managedBehavioursOff.Length : 0);
                p_owner.managedBehavioursOriginalState = new bool[len];
            }
            if (manageGameObjects)
            {
                int len = (managedGameObjectsOn != null ? managedGameObjectsOn.Length : 0) + (managedGameObjectsOff != null ? managedGameObjectsOff.Length : 0);
                p_owner.managedGameObjectsOriginalState = new bool[len];
            }
        }
Пример #2
0
        // ***********************************************************************************
        // CONSTRUCTOR
        // ***********************************************************************************

        /// <summary>
        /// Creates a new TweenInfo object.
        /// </summary>
        public TweenInfo(ABSTweenComponent tween)
        {
            this.tween = tween;
            isSequence = (tween is Sequence);
            targets    = tween.GetTweenTargets();
        }
Пример #3
0
            // ***********************************************************************************
            // CONSTRUCTOR
            // ***********************************************************************************

            public HOTSeqItem(float p_startTime, ABSTweenComponent p_twMember)
            {
                startTime = p_startTime;
                twMember = p_twMember;
                twMember.autoKillOnComplete = false;
                seqItemType = SeqItemType.Tween;
            }
Пример #4
0
        // ===================================================================================
        // INTERNAL METHODS ------------------------------------------------------------------

        /// <summary>
        /// Removes the given tween from this Sequence,
        /// and eventually kills the Sequence if all items have been removed.
        /// Used by <see cref="OverwriteManager"/> to remove overwritten tweens.
        /// </summary>
        internal void Remove(ABSTweenComponent p_tween)
        {
            if (items == null) return;

            int itemsCount = items.Count;
            for (int i = 0; i < itemsCount; ++i) {
                HOTSeqItem item = items[i];
                if (item.seqItemType == SeqItemType.Tween && item.twMember == p_tween) {
                    items.RemoveAt(i);
                    break;
                }
            }
            if (items.Count == 0) {
                if (isSequenced) {
                    contSequence.Remove(this);
                }
                Kill(!isSequenced);
            }
        }
        // ***********************************************************************************
        // INIT
        // ***********************************************************************************

        /// <summary>
        /// Initializes the given owner with the stored parameters.
        /// </summary>
        /// <param name="p_owner">
        /// The <see cref="ABSTweenComponent"/> to initialize.
        /// </param>
        protected void InitializeOwner(ABSTweenComponent p_owner)
        {
            p_owner._id = id;
            p_owner._intId = intId;
            p_owner._autoKillOnComplete = autoKillOnComplete;
            p_owner._updateType = updateType;
            p_owner._timeScale = timeScale;
            p_owner._loops = loops;
            p_owner._loopType = loopType;
            p_owner._isPaused = isPaused;

            p_owner.onStart = onStart;
            p_owner.onStartWParms = onStartWParms;
            p_owner.onStartParms = onStartParms;
            p_owner.onUpdate = onUpdate;
            p_owner.onUpdateWParms = onUpdateWParms;
            p_owner.onUpdateParms = onUpdateParms;
            p_owner.onPluginUpdated = onPluginUpdated;
            p_owner.onPluginUpdatedWParms = onPluginUpdatedWParms;
            p_owner.onPluginUpdatedParms = onPluginUpdatedParms;
            p_owner.onPause = onPause;
            p_owner.onPauseWParms = onPauseWParms;
            p_owner.onPauseParms = onPauseParms;
            p_owner.onPlay = onPlay;
            p_owner.onPlayWParms = onPlayWParms;
            p_owner.onPlayParms = onPlayParms;
            p_owner.onRewinded = onRewinded;
            p_owner.onRewindedWParms = onRewindedWParms;
            p_owner.onRewindedParms = onRewindedParms;
            p_owner.onStepComplete = onStepComplete;
            p_owner.onStepCompleteWParms = onStepCompleteWParms;
            p_owner.onStepCompleteParms = onStepCompleteParms;
            p_owner.onComplete = onComplete;
            p_owner.onCompleteWParms = onCompleteWParms;
            p_owner.onCompleteParms = onCompleteParms;

            p_owner.manageBehaviours = manageBehaviours;
            p_owner.manageGameObjects = manageGameObjects;
            p_owner.managedBehavioursOn = managedBehavioursOn;
            p_owner.managedBehavioursOff = managedBehavioursOff;
            p_owner.managedGameObjectsOn = managedGameObjectsOn;
            p_owner.managedGameObjectsOff = managedGameObjectsOff;
            if (manageBehaviours) {
                int len = (managedBehavioursOn != null ? managedBehavioursOn.Length : 0) + (managedBehavioursOff != null ? managedBehavioursOff.Length : 0);
                p_owner.managedBehavioursOriginalState = new bool[len];
            }
            if (manageGameObjects) {
                int len = (managedGameObjectsOn != null ? managedGameObjectsOn.Length : 0) + (managedGameObjectsOff != null ? managedGameObjectsOff.Length : 0);
                p_owner.managedGameObjectsOriginalState = new bool[len];
            }
        }
Пример #6
0
        // ***********************************************************************************
        // CONSTRUCTOR
        // ***********************************************************************************

        /// <summary>
        /// Creates a new TweenInfo object.
        /// </summary>
        public TweenInfo(ABSTweenComponent tween)
        {
            this.tween = tween;
            isSequence = (tween is Sequence);
            targets = tween.GetTweenTargets();
        }
Пример #7
0
 static void AddTween(ABSTweenComponent p_tween)
 {
     if (tweenGOInstance == null) {
         NewTweenInstance();
     }
     if (tweens == null) {
         tweens = new List<ABSTweenComponent>();
         it.StartCoroutines();
     }
     tweens.Add(p_tween);
     SetGOName();
 }