private IEnumerator Action1() { SystemManager.GetInstance().sceneTouchEnabled = false; LayerManager.GetInstance().AddPopUpView <GuideWindow>(); GirlEntity2D girl = GameObject.FindGameObjectWithTag(TagDefines.TAG_GIRL).GetComponent <GirlEntity2D>(); girl.Play(AnimationDefs.Sleep.ToString().ToLower()); LayerMaskDefines.GUIDE.ToLayer(girl.gameObject); yield return(new WaitForSeconds(4f)); Action <tk2dSpriteAnimator, tk2dSpriteAnimationClip> AnimationCompleted = null; AnimationCompleted = (tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip) => { girl.componentsHolder.GetComponent(ComponentDefs.Body).animator.AnimationCompleted -= AnimationCompleted; task.Stop(); task = new Task(Action2()); GuideWindow guideWin = LayerManager.GetInstance().GetPopUpView <GuideWindow>(); guideWin.FadeOut(); }; girl.componentsHolder.GetComponent(ComponentDefs.Body).animator.AnimationCompleted += AnimationCompleted; girl.componentsHolder.GetComponent(ComponentDefs.Body).Play(AnimationDefs.Wake.ToString().ToLower()); }
public void ShowGuide(object sender, EventArgs e) { GuideWindow guideWindow = new GuideWindow(); guideWindow.ShowDialog(); }