mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
!2503 functions
This commit is contained in:
parent
3a18fb16c2
commit
65ac7b451d
1 changed files with 20 additions and 0 deletions
|
|
@ -586,6 +586,26 @@ fun resetAnimator(player: Player) {
|
|||
player.animator.animate(Animation(-1, Animator.Priority.VERY_HIGH))
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a player's render animation to a given animation.
|
||||
* @param player the player whose render animation to set
|
||||
* @param animation the ID of the render animation to set
|
||||
*/
|
||||
fun renderAnimation(player: Player, animation: Int) {
|
||||
player.appearance.setAnimations(Animation(animation))
|
||||
player.appearance.sync()
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets a player's render animation to the default.
|
||||
* @param player the player whose render animation to reset
|
||||
*/
|
||||
fun resetRenderAnimation(player: Player) {
|
||||
player.appearance.setDefaultAnimations()
|
||||
player.appearance.setAnimations()
|
||||
player.appearance.sync()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of ticks an animation lasts
|
||||
* @param animation the Animation object to check the duration of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue