public override void Reset () { gameObject = new ConcreteGameObjectVar(this.self); animationName = new ConcreteStringVar(); fadeLength = .3f; queue = QueueMode.CompleteOthers; playMode = PlayMode.StopSameLayer; }
public override void OnReset() { targetGameObject = null; animationName.Value = ""; queue = QueueMode.CompleteOthers; playMode = PlayMode.StopSameLayer; }
public override void OnReset() { if (animationName != null) { animationName.Value = ""; } queue = QueueMode.CompleteOthers; playMode = PlayMode.StopSameLayer; }
public AnimationState PlayQueued(string animation, QueueMode queue) { PlayMode mode = PlayMode.StopSameLayer; return this.PlayQueued(animation, queue, mode); }
public AnimationState CrossFadeQueued(string animation, float fadeLength, QueueMode queue) { PlayMode mode = PlayMode.StopSameLayer; return this.CrossFadeQueued(animation, fadeLength, queue, mode); }
/// <summary> /// Plays an animation after previous animations has finished playing. <br/> /// If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> /// If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> /// </summary> /// <param name="name">The name of animation clip you want to play.</param> /// <param name="queue">QueueMode control how to play the clip in queue.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState PlayQueued(string name, QueueMode queue) { return(PlayQueued(name, queue, PlayMode.StopSameLayer)); }
public void SetQueueMode(QueueMode mode) => SetArg("queue-mode", mode.Convert());
/// <summary> /// Cross fades an animation after previous animations has finished playing.<br/> ///If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> ///If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> /// if mode is PlayMode.StopSameLayer, animations in the same layer as animation will be faded out while animation is faded in. if mode is PlayMode.StopAll, all animations will be faded out while animation is faded in.<br/> ///After the animation has finished playing it will automatically clean itself up. Using the duplicated animation state after it has finished will result in an exception. <br/> /// </summary> /// <param name="name">The clip name that you want to fade in.</param> /// <param name="fadeLength">The fade in/out length in second.</param> /// <param name="queue">How the clip start fade.</param> /// <param name="mode">How to stop the other clips.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState CrossFadeQueued(string name, float fadeLength, QueueMode queue, PlayMode mode) { SpriteAnimationState state = this[name]; if (state == null) return null; bool isPlaying = IsLayerPlaying(state.layer); if (queue == QueueMode.PlayNow || !isPlaying) { string newName = state.name + " - Queued Clone " + cloneID++; SpriteAnimationState tmpState = new SpriteAnimationState(state, newName); tmpState.removeAfterStop = true; AddState(tmpState); CrossFade(tmpState, fadeLength, mode); return tmpState; } else { string newName = state.name + " - Queued Clone " + cloneID++; SpriteAnimationState tmpState = new SpriteAnimationState(state, newName); tmpState.removeAfterStop = true; AddState(tmpState); SpriteAnimationQueueItem item = new SpriteAnimationQueueItem(); item.state = tmpState; item.playMode = mode; item.fadeLength = fadeLength; crossFadeQueue.Add(item); return tmpState; } return null; }
/// <summary> /// Plays an animation after previous animations has finished playing.<br/> /// If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> /// If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> /// if mode is PlayMode.StopSameLayer, animations in the same layer as animation will be faded out while animation is faded in. if mode is PlayMode.StopAll, all animations will be faded out while animation is faded in.<br/> /// After the animation has finished playing it will automatically clean itself up. Using the duplicated animation state after it has finished will result in an exception. /// </summary> /// <param name="name">The name of animation clip you want to play.</param> /// <param name="queue">QueueMode control how to play the clip in queue.</param> /// <param name="mode">QueueMode control how to play the clip in queue.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState PlayQueued(string name, QueueMode queue, PlayMode mode) { SpriteAnimationState state = this[name]; if (state == null) return null; bool isPlaying = IsLayerPlaying(state.layer); if (queue == QueueMode.PlayNow || !isPlaying ) { string newName = state.name + " - Queued Clone " + cloneID++; SpriteAnimationState tmpState = new SpriteAnimationState(state, newName); tmpState.removeAfterStop = true; AddState(tmpState); Play(newName); return tmpState; } else { string newName = state.name + " - Queued Clone " + cloneID++; SpriteAnimationState tmpState = new SpriteAnimationState(state, newName); tmpState.removeAfterStop = true; AddState(tmpState); playingQueue.Add( tmpState ); return tmpState; } return null; }
public AnimationState PlayQueued(string animation, QueueMode queue){}
public void PlayQueued(string stateName, QueueMode queueMode) { m_Animator.enabled = true; Kick(); m_Playable.PlayQueued(stateName, queueMode); }
public void CrossFadeQueued(string stateName, float fadeLength, QueueMode queueMode) { m_Animator.enabled = true; Kick(); m_Playable.CrossfadeQueued(stateName, fadeLength, queueMode); }
public void CrossFade(float speed, float fadeLength, QueueMode queueMode = QueueMode.PlayNow, PlayMode playMode = PlayMode.StopSameLayer) { }
public void Play(float speed, QueueMode queueMode = QueueMode.PlayNow, PlayMode playMode = PlayMode.StopSameLayer) { }
public void Play(QueueMode queueMode = QueueMode.PlayNow, PlayMode playMode = PlayMode.StopSameLayer) { }
public PendingMessage(string busId, MessagingBus.QueuedSceneMessage_Scene message, QueueMode queueMode) { this.busId = busId; this.message = message; this.queueMode = queueMode; }
internal AnimationState CrossFadeQueuedInternal(string clipId, float fadeLength, QueueMode queueMode, PlayMode playMode, int layer) { if (_animation == null) { throw new AnimationInvalidAccessException(); } if (!_initialized) { this.Init(); } var anim = _animation.CrossFadeQueued(clipId, fadeLength, queueMode, playMode); if (_scriptableAnims != null && _scriptableAnims.Count > 0) { if (playMode == PlayMode.StopAll) { _scriptableAnims.Clear(true); } else { _scriptableAnims.Remove(layer, true); } } return(anim); }
public AnimationState CrossFadeQueued(string animation, float fadeLength, QueueMode queue){}
public AnimationState CrossFadeAnimQueued(AnimGroup group, AnimIndex anim, float duration, QueueMode queueMode, PlayMode playMode) { var animState = LoadAnim(group, anim); if (null == animState) { return(null); } _curAnimGroup = group; _curAnim = anim; _anim.CrossFadeQueued(animState.name, duration, queueMode, playMode); return(animState); }
/// <summary> /// Plays an animation after previous animations has finished playing. <br/> /// If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> /// If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> /// </summary> /// <param name="name">The name of animation clip you want to play.</param> /// <param name="queue">QueueMode control how to play the clip in queue.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState PlayQueued(string name, QueueMode queue) { return PlayQueued(name, queue, PlayMode.StopSameLayer); }
public bool PlayQueued(string name, QueueMode queueMode, PlayMode playMode) { return this.idleMixer.PlayQueued(name, queueMode, playMode); }
/// <summary> /// Cross fades an animation after previous animations has finished playing.<br/> ///If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> ///If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> ///After the animation has finished playing it will automatically clean itself up. Using the duplicated animation state after it has finished will result in an exception. <br/> /// </summary> /// <param name="name">The clip name that you want to fade in.</param> /// <param name="fadeLength">The fade in/out length in second.</param> /// <param name="queue">How the clip start fade.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState CrossFadeQueued(string name, float fadeLength, QueueMode queue) { return CrossFadeQueued(name, fadeLength, queue, PlayMode.StopSameLayer); }
public bool AddSelectedTracks (Source source, Selection selection, QueueMode mode) { if ((Parent == null || source == Parent || source.Parent == Parent) && AcceptsInputFromSource (source)) { DatabaseTrackListModel model = (source as ITrackModelSource).TrackModel as DatabaseTrackListModel; if (model == null) { return false; } selection = selection ?? model.Selection; long view_order = CalculateViewOrder (mode); long max_view_order = MaxViewOrder; long current_view_order = CurrentTrackViewOrder; // If the current_track is not playing, insert before it. int index = -1; if (current_track != null && !ServiceManager.PlayerEngine.IsPlaying (current_track)) { current_view_order--; index = TrackModel.IndexOf (current_track); } WithTrackSelection (model, selection, shuffler.RecordInsertions); // Add the tracks to the end of the queue. WithTrackSelection (model, selection, AddTrackRange); if (mode != QueueMode.Normal) { ShiftForAddedAfter (view_order, max_view_order); } ShiftGeneratedTracks (view_order); OnTracksAdded (); OnUserNotifyUpdated (); // If the current_track was not playing, and there were no non-generated tracks, // mark the first added track as current. if (index != -1 && view_order == current_view_order) { SetCurrentTrack (TrackModel[index] as DatabaseTrackInfo); SetAsPlaybackSourceUnlessPlaying (); } return true; } return false; }
private void AddSelectedToPlayQueue (QueueMode mode) { var track_actions = ServiceManager.Get<InterfaceActionService> ().TrackActions; playqueue.AddSelectedTracks (ServiceManager.SourceManager.ActiveSource, track_actions.Selection, mode); }
/// <summary> /// Cross fades an animation after previous animations has finished playing.<br/> ///If queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing.<br/> ///If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state.<br/> ///After the animation has finished playing it will automatically clean itself up. Using the duplicated animation state after it has finished will result in an exception. <br/> /// </summary> /// <param name="name">The clip name that you want to fade in.</param> /// <param name="fadeLength">The fade in/out length in second.</param> /// <param name="queue">How the clip start fade.</param> /// <returns>The duplicated animation state of the clip.</returns> public SpriteAnimationState CrossFadeQueued(string name, float fadeLength, QueueMode queue) { return(CrossFadeQueued(name, fadeLength, queue, PlayMode.StopSameLayer)); }
public bool AddSelectedTracks (Source source, QueueMode mode) { return AddSelectedTracks (source, null, mode); }
public AnimationState CrossFadeAnimQueued(AnimGroup group, AnimIndex anim, float duration, QueueMode queueMode, PlayMode playMode) { var animState = LoadAnim(group, anim); _curAnimGroup = AnimGroup = group; _curAnim = AnimIndex = anim; _anim.CrossFadeQueued(animState.name, duration, queueMode, playMode); return animState; }
private long CalculateViewOrder (QueueMode mode) { long view_order = 0; long current_view_order = CurrentTrackViewOrder; switch (mode) { case QueueMode.AfterCurrentTrack: // view_order will point to the currently playing track, or if we're playing from // somewhere besides the play queue it will point to the very top of the queue. // We want to insert tracks after this one. view_order = ServiceManager.PlaybackController.Source is PlayQueueSource ? current_view_order : current_view_order - 1; break; case QueueMode.AfterCurrentAlbum: // view order will point to the last track of the currently // playing album. IterateTrackModelUntilEndMatch (out view_order, true); break; case QueueMode.AfterCurrentArtist: // view order will point to the last track of the currently // playing artist. IterateTrackModelUntilEndMatch (out view_order, false); break; case QueueMode.Normal: // view_order will point to the last pending non-generated track in the queue // or to the current_track if all tracks are generated. We want to insert tracks after it. view_order = Math.Max(current_view_order, ServiceManager.DbConnection.Query<long> (@" SELECT MAX(ViewOrder) FROM CorePlaylistEntries WHERE PlaylistID = ? AND ViewOrder > ? AND Generated = 0", DbId, current_view_order )); break; default: throw new ArgumentException ("Handling for that QueueMode has not been defined"); } return view_order; }
public static void CrossFade(this ISPAnim anim, float speed, float fadeLength, float startTime, QueueMode queueMode = QueueMode.PlayNow, PlayMode playMode = PlayMode.StopSameLayer) { if (anim == null) { throw new System.ArgumentNullException("anim"); } anim.Speed = speed; anim.CrossFade(fadeLength, queueMode, playMode); anim.Time = Mathf.Clamp(startTime, 0f, anim.Duration); }