3 [
Attribute(
"0.5",
desc:
"Long fade delay when moved in and out of vehicles. In seconds.")]
4 protected float m_fLongFadeDelay;
6 [
Attribute(
"TeleportingText",
desc:
"Teleport Text widget name")]
7 protected string m_sTeleportTextName;
11 protected Widget m_wRoot;
18 m_FadeUIComponent.CancelFade(
false);
24 m_FadeUIComponent.FadeOut(
false);
26 if (m_TeleportTextFadeUIComponent)
27 m_TeleportTextFadeUIComponent.GetFadeWidget().SetVisible(
false);
31 m_FadeUIComponent.DelayedFadeOut(m_fLongFadeDelay * 1000,
false);
33 if (m_TeleportTextFadeUIComponent)
34 m_TeleportTextFadeUIComponent.FadeIn(
true);
39 override void HandlerAttached(Widget w)
44 if (!m_FadeUIComponent)
46 Print(
"'SCR_PlayerTeleportFeedbackUIComponent' could not find 'm_FadeUIComponent', make sure the fadecomponent is added before this component", LogLevel.ERROR);
51 if (!playerController)
54 SCR_PlayerTeleportedFeedbackComponent playerTeleportedComponent = SCR_PlayerTeleportedFeedbackComponent.Cast(playerController.FindComponent(SCR_PlayerTeleportedFeedbackComponent));
55 if (!playerTeleportedComponent)
57 Print(
"'SCR_PlayerTeleportFeedbackUIComponent' could not find 'SCR_PlayerTeleportedFeedbackComponent', make sure it is added to the player controller", LogLevel.ERROR);
61 Widget teleportTextWidget = w.FindAnyWidget(m_sTeleportTextName);
62 if (teleportTextWidget)
68 playerTeleportedComponent.GetOnPlayerTeleported().Insert(OnPlayerTeleported);
70 override void HandlerDeattached(Widget w)
72 if (!m_FadeUIComponent)
76 if (!playerController)
79 SCR_PlayerTeleportedFeedbackComponent playerTeleportedComponent = SCR_PlayerTeleportedFeedbackComponent.Cast(playerController.FindComponent(SCR_PlayerTeleportedFeedbackComponent));
80 if (!playerTeleportedComponent)
83 playerTeleportedComponent.GetOnPlayerTeleported().Remove(OnPlayerTeleported);