本文整理汇总了C#中Score.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Score.Start方法的具体用法?C# Score.Start怎么用?C# Score.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Score
的用法示例。
在下文中一共展示了Score.Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FadeCoversInAndOut
private void FadeCoversInAndOut(List<ClutterFlowBaseActor> old_covers,
List<ClutterFlowBaseActor> persistent_covers,
List<ClutterFlowBaseActor> new_covers,
EventHandler on_completed, double new_progress)
{
//Console.WriteLine ("FADE COVERS IN AND OUT");
if (old_covers==null || persistent_covers==null || new_covers==null) return;
if (TransitionAnimationBusy) {
transition_queue.Enqueue(new TransitionStruct(old_covers, persistent_covers, new_covers, new_progress, on_completed));
}
if (fadeOutAnim!=null) { fadeOutAnim.CompleteAnimation (); fadeOutAnim = null; }
if (fadeInAnim!=null) { fadeInAnim.CompleteAnimation (); fadeInAnim = null; }
if (t_slide!=null) { t_slide.Advance(t_slide.Duration); t_slide = null; }
#region fade out of removed covers
foreach (ClutterFlowBaseActor cover in old_covers) {
if (cover!=null) {
FadeOutActor (cover);
fadeOutAnim.Timeline.Pause ();
}
}
#endregion
#region sliding of persistent covers
foreach (ClutterFlowBaseActor cover in persistent_covers) {
if (cover!=null) {
cover.Data["alpha_ini"] = cover.Data["last_alpha"];
cover.Data["alpha_end"] = AlphaFunc(cover, new_progress);
}
}
t_slide = new Timeline (CoverManager.MaxAnimationSpan*fade_slow);
t_slide.NewFrame += delegate (object o, NewFrameArgs args) {
foreach (ClutterFlowBaseActor cover in persistent_covers) {
if (cover!=null && cover.Data.ContainsKey ("alpha_ini") && cover.Data.ContainsKey ("alpha_end")) {
double alpha_end = (double) cover.Data["alpha_end"];
double alpha_ini = (double) cover.Data["alpha_ini"];
UpdateActorWithAlpha (cover, alpha_ini + (alpha_end - alpha_ini) * t_slide.Progress);
}
}
};
#endregion
#region fade in of new covers
foreach (ClutterFlowBaseActor cover in new_covers) {
if (cover!=null) {
UpdateActorWithAlpha (cover, AlphaFunc(cover));
FadeInActor (cover);
fadeInAnim.Timeline.Pause ();
}
}
#endregion
#region clearing, setting and playing of transition score:
if (transition_score!=null) {
GC.SuppressFinalize (transition_score);
transition_score.Completed -= HandleScoreCompleted;
/*if (transition_score.IsPlaying) {
transition_score.Completed
}
transition_score = null;*/
}
transition_score = new Score();
transition_score.Completed += HandleScoreCompleted;
Timeline parent = null;
if (fadeOutAnim!=null && fadeOutAnim.Timeline!=null) {
transition_score.Append(parent, fadeOutAnim.Timeline);
parent = fadeOutAnim.Timeline;
}
if (t_slide!=null) {
transition_score.Append(parent, t_slide);
parent = t_slide;
}
if (fadeInAnim!=null && fadeInAnim.Timeline!=null) {
transition_score.Append(parent, fadeInAnim.Timeline);
parent = fadeInAnim.Timeline;
}
SetPreviousBounds (new_progress);
CoverManager.SortDepthOrder ();
if (parent!=null) {
transition_score.Completed += on_completed;
transition_score.Start ();
} else {
on_completed (this, EventArgs.Empty);
}
#endregion
}