Setting Gum Animationchain Achx in Code
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
var gumSprite = GumScreen.SpriteInstance;
gumSprite.Animate = true;
gumSprite.CurrentChainName = "CharacterWalkRight";
// The SourceFile property is a Texture2D, but we can also set it to
// a file path which will resolve to an animation using the SetProperty method.
gumSprite.SetProperty("SourceFile", "../Screens/MainMenu/PlatformerAnimations.achx");
gumSprite.TextureAddress = Gum.Managers.TextureAddress.Custom;