public void Activate(Player player) { EventMap events = api.EventMap; if (events == null) { return; } Vector2 targetPos = events.GetWarpTarget(warpTarget); if (targetPos.X < 0f || targetPos.Y < 0f) { // Warp target not found return; } player.WarpToPosition(targetPos, fast); }
public void Activate(Player player) { EventMap events = levelHandler.EventMap; if (events == null) { return; } Vector2 targetPos = events.GetWarpTarget(warpTarget); if (targetPos.X < 0f || targetPos.Y < 0f) { // Warp target not found return; } player.WarpToPosition(targetPos, fast); #if MULTIPLAYER && SERVER ((LevelHandler)levelHandler).OnPlayerIncrementLaps(player); #endif }