예제 #1
0
 public void TestConstructor() {
   Effect effect = this.contentManager.Load<Effect>("ScreenMaskEffect");
   using(
     ScreenMask<PositionVertex> testMask = new ScreenMask<PositionVertex>(
       this.mockedGraphicsDeviceService.GraphicsDevice,
       effect,
       new PositionVertex[4]
     )
   ) { }
 }
예제 #2
0
        private void StartScene()
        {
            Animator enterLeaveScene = GameObject.Instantiate <Animator>(m_EnterLeaveScene);

            m_EnterLeaveScene = enterLeaveScene;

            ScreenMask mask = m_EnterLeaveScene.GetComponent <ScreenMask>();

            mask.onAnimEnd = StartSceneComplete;
            m_EnterLeaveScene.Play("EnterScene");
        }
예제 #3
0
 public void ScreenWhiteToNormal(float duration, UnityEngine.Events.UnityAction action = null)
 {
     if (duration <= 0)
     {
         ScreenMask.Hide(); return;
     }
     ScreenMask.Show(false, false, duration);
     Utils.GameUtil.DelayFunc(delegate { if (action != null)
                                         {
                                             action();
                                         }
                                         ScreenMask.Hide(); }, duration);
 }
예제 #4
0
        public override void LeaveScene()
        {
            ScreenMask mask = m_EnterLeaveScene.GetComponent <ScreenMask>();

            mask.onAnimEnd += LeavedAnimPlayed;
            m_EnterLeaveScene.Play("LeaveScene");
            foreach (Transform actorTrans in m_NPCList)
            {
                BaseActorObj actor = actorTrans.GetComponent <BaseActorObj>();
                actor.StopGame();
            }
            m_Player.StopGame();
        }
예제 #5
0
 public void ScreenNormalToWhite(float duration, bool autoDisable, UnityEngine.Events.UnityAction action = null)
 {
     if (duration <= 0)
     {
         ScreenMask.ShowWhite(); return;
     }
     ScreenMask.Show(true, false, duration);
     Utils.GameUtil.DelayFunc(delegate { if (action != null)
                                         {
                                             action();
                                         }
                                         if (autoDisable)
                                         {
                                             ScreenMask.Hide();
                                         }
                              }, duration);
 }
예제 #6
0
    public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        ScreenMask mask = animator.gameObject.GetComponent <ScreenMask>();

        mask.OnAnimEnd();
    }