Skip to content

Instantly share code, notes, and snippets.

@paradrogue
paradrogue / SpriteStack.gd
Last active January 26, 2021 14:33
A simple sprite stack for Godot. Can handle rotation of the parent node.
extends Node2D
# The texture (spritesheet) to use as the stacked sprite.
# This should be of the form <frames*height> x <height>.
# i.e. a 10 frame stack of 32px x 32px images should 320px x 32px.
export (Texture) var texture:Texture
# The vertical scale multiplier.
export (float) var v_scale:float = 1.0