public void TestConstructor() { Effect effect = this.contentManager.Load<Effect>("ScreenMaskEffect"); using( ScreenMask<PositionVertex> testMask = new ScreenMask<PositionVertex>( this.mockedGraphicsDeviceService.GraphicsDevice, effect, new PositionVertex[4] ) ) { } }
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"); }
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); }
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(); }
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); }
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { ScreenMask mask = animator.gameObject.GetComponent <ScreenMask>(); mask.OnAnimEnd(); }