示例#1
0
 static void AttractPlayer(Zone zone, PlayerClient player)
 {
     cachedDirection          = player.lastKnownPosition - zone.transform.position;
     player.lastKnownPosition = zone.transform.position + (cachedDirection / cachedDirection.magnitude * (zone.GetComponent <UnityEngine.SphereCollider>().radius - 2f));
     management.TeleportPlayerToWorld(player.netPlayer, player.lastKnownPosition);
 }
 static void AttractPlayer(Zone zone, BasePlayer player)
 {
     cachedDirection           = player.transform.position - zone.transform.position;
     player.transform.position = zone.transform.position + (cachedDirection / cachedDirection.magnitude * (zone.GetComponent <UnityEngine.SphereCollider>().radius - 1f));
     player.ClientRPC(null, player, "ForcePositionTo", new object[] { player.transform.position });
     player.TransformChanged();
 }
示例#3
0
 static void EjectPlayer(Zone zone, PlayerClient player)
 {
     cachedDirection          = player.lastKnownPosition - zone.transform.position;
     player.lastKnownPosition = zone.transform.position + (cachedDirection / cachedDirection.magnitude * (zone.GetComponent <UnityEngine.SphereCollider>().radius + 2f));
     management.TeleportPlayerToWorld(player.netPlayer, player.lastKnownPosition);
     Interface.CallHook("IsCollidingEject", zone, player);
 }