fr.jeanf.universal.player 0.8.33 → 0.8.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,8 +25,6 @@ namespace jeanf.universalplayer
|
|
|
25
25
|
|
|
26
26
|
public void Teleport(TeleportInformation teleportInformation)
|
|
27
27
|
{
|
|
28
|
-
FadeMask.TogglePPE.Invoke(false);
|
|
29
|
-
FadeEventChannel?.RaiseEvent(true, 0.1f);
|
|
30
28
|
if (teleportInformation.isUsingFilter)
|
|
31
29
|
{
|
|
32
30
|
if (!listOfFilters.Contains(teleportInformation.filter))
|
|
@@ -64,18 +62,8 @@ namespace jeanf.universalplayer
|
|
|
64
62
|
{
|
|
65
63
|
if (isDebug) Debug.Log("teleportation subject is not player - cannot disable player locomotion for teleportation");
|
|
66
64
|
}
|
|
67
|
-
|
|
68
65
|
if ( teleportInformation.objectIsPlayer ) cameraResetChannel.RaiseEvent();
|
|
69
66
|
if (_isDebug) Debug.Log( $"[{teleportInformation.targetDestination.gameObject.name}] teleported {teleportSubject.gameObject.name} to {teleportInformation.targetDestination.transform.position} with rotation: {teleportInformation.targetDestination.transform.rotation.eulerAngles}");
|
|
70
|
-
StartCoroutine(CheckIfPlayerInDestination(teleportSubject, teleportInformation));
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
IEnumerator CheckIfPlayerInDestination(GameObject teleportSubject, TeleportInformation teleportInformation)
|
|
75
|
-
{
|
|
76
|
-
yield return new WaitForSeconds(1f);
|
|
77
|
-
FadeEventChannel.RaiseEvent(false, 1.0f);
|
|
78
|
-
FadeMask.TogglePPE.Invoke(true);
|
|
79
67
|
|
|
80
68
|
}
|
|
81
69
|
}
|