s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
AnimationState
chevron_left
Classes
class
AnimationState
search
Constructors
functions
AnimationState
Fields
crop_din
CurrentFrameIndex
crop_din
IsPingPonging
crop_din
PlaybackSpeed
crop_din
TimeSinceLastFrame
Properties
data_object
JustFinished
Methods
functions
ResetState
functions
TryAdvanceFrame
AnimationState
Contains the state of a sprite instance's animation playback.
class
Sandbox.Sprite
.
Sandbox.Engine
build
Constructors
1
AnimationState
(
)
crop_din
Fields
4
CurrentFrameIndex
int
The current frame index in the animation.
IsPingPonging
bool
Whether or not the animation is currently ping-ponging. This is only relevant for animations that have Sandbox.Sprite.LoopMode.PingPong
PlaybackSpeed
float
The speed at which the animation is playing back. A value of 1 means normal speed, 0.5 means half speed, and -1 means reverse playback.
TimeSinceLastFrame
float
The time since the last frame was advanced.
data_object
Properties
1
JustFinished
bool
Returns true if the animation finished, looped, or ping-ponged after calling Sandbox.Sprite.AnimationState.TryAdvanceFrame(Sandbox.Sprite.Animation,System.Single)
functions
Methods
2
ResetState
(
)
Reset the animation playback state to the beginning (first frame, no ping-pong, zero time-since).
TryAdvanceFrame
(
animation
,
deltaTime
)
bool
Try to advance the frame of a given animation with a given delta time. Returns false if the frame did not advance.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.