Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents a client input lock that can be applied to a player to disable specific inputs such as camera rotation, movement, jumping, sneaking or mounting/dismounting entities.
func All ¶
func All() []Lock
All returns all the input locks that are available to be applied to a player.
func Dismount ¶
func Dismount() Lock
Dismount is the lock that prevents the player from dismounting entities.
func LateralMovement ¶
func LateralMovement() Lock
LateralMovement is the lock that disables all player movement excluding jumping and sneaking.
func MoveBackward ¶
func MoveBackward() Lock
MoveBackward is the lock that disables backward movement.
type Restricter ¶
type Restricter interface {
// LockInput applies an input lock to the player, disabling the specified input.
LockInput(l Lock)
// UnlockInput removes an input lock from the player, re-enabling the specified input.
UnlockInput(l Lock)
// ClearInputLocks removes all input locks from the player, re-enabling all inputs.
ClearInputLocks()
// InputLocked checks if a specific input lock is currently applied to the player.
InputLocked(l Lock) bool
}
Restricter represents an interface that can manage input locks for a player.
Click to show internal directories.
Click to hide internal directories.