Esempio n. 1
0
 void toggleTeleport(bool enabled)
 {
     if (enabled)
     {
         teleport.EnableTeleportation();
     }
     else
     {
         teleport.DisableTeleportation();
     }
 }
Esempio n. 2
0
        public void ChangeLocomotionType(LocomotionType loc)
        {
            selectedLocomotion = loc;

            if (teleport == null)
            {
                teleport = GetComponent <PlayerTeleport>();
            }

            if (selectedLocomotion == LocomotionType.Teleport)
            {
                teleport.EnableTeleportation();
            }
            else if (selectedLocomotion == LocomotionType.SmoothLocomotion)
            {
                teleport.DisableTeleportation();
            }
            // Default to Disable All
            else
            {
                // Disable all
                teleport.DisableTeleportation();
            }
        }