s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamslive now

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

The jam is running. Build something, or play the entries.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
AnimationState
chevron_left Classes
class
AnimationState

Constructors

functionsAnimationState

Fields

crop_dinCurrentFrameIndexcrop_dinIsPingPongingcrop_dinPlaybackSpeedcrop_dinTimeSinceLastFrame

Properties

data_objectJustFinished

Methods

functionsResetStatefunctionsTryAdvanceFrame
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.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter