示例#1
0
        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);
        }
示例#2
0
        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
        }