public static void Send(this ScreenFX effect, Mobile to) { if (to == null) { return; } switch (effect) { case ScreenFX.FadeOut: to.Send(VNScreenFadeOut.Instance); break; case ScreenFX.FadeIn: to.Send(VNScreenFadeIn.Instance); break; case ScreenFX.LightFlash: to.Send(VNScreenLightFlash.Instance); break; case ScreenFX.FadeInOut: to.Send(VNScreenFadeInOut.Instance); break; case ScreenFX.DarkFlash: to.Send(VNScreenDarkFlash.Instance); break; } }
void Start() { m_depth = gameObject.transform.position.z; m_fx = GetComponent <ScreenFX>(); }