Exemple #1
0
        // -------------------------------------------------------------------------------
        // OnClickConfirm
        // @Client
        // -------------------------------------------------------------------------------
        public override void OnClickConfirm()
        {
            GameObject player = PlayerComponent.localPlayer;

            if (player == null)
            {
                return;
            }

            PlayerComponent pc = player.GetComponent <PlayerComponent>();

            if (player != null && targetAnchor != null && pc.CheckCooldown)
            {
                pc.Cmd_WarpLocal(targetAnchor);
            }

            base.OnClickConfirm();
        }
        // -------------------------------------------------------------------------------
        // OnClickConfirm
        // @Client
        // -------------------------------------------------------------------------------
        public override void OnClickConfirm()
        {
            GameObject player = PlayerComponent.localPlayer;

            if (player == null)
            {
                return;
            }

            PlayerComponent pc = player.GetComponent <PlayerComponent>();

            int    index        = UnityEngine.Random.Range(0, targetAnchors.Length);
            string targetAnchor = targetAnchors[index].name;

            if (player != null && !String.IsNullOrWhiteSpace(targetAnchor) && pc.CheckCooldown)
            {
                pc.Cmd_WarpLocal(targetAnchor);
            }

            base.OnClickConfirm();
        }
Exemple #3
0
        // -------------------------------------------------------------------------------

        void OnClickConfirm()
        {
            PlayerComponent pc = PlayerComponent.localPlayer.GetComponentInParent <PlayerComponent>();

            pc.Cmd_WarpLocal(targetAnchor);
        }