Types/Sprite: Difference between revisions
m (removed lang template (these pages should not be translated)) |
(Changed links going to the redirect Types/unsigned to go to Types/uint32.) |
||
Line 17: | Line 17: | ||
=== width === | === width === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
Width of the picture in pixels. | Width of the picture in pixels. | ||
=== height === | === height === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
Height of the picture in pixels | Height of the picture in pixels | ||
=== x === | === x === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
'''Default''': 0 | '''Default''': 0 | ||
Line 32: | Line 32: | ||
=== y === | === y === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
'''Default''': 0 | '''Default''': 0 |
Revision as of 10:42, 25 June 2018
Basics
Specifies one picture that can be used in the game.
When there is more than one sprite or animation frame with the same source file and dimensions/position in the game, they all share the same memory.
Properties
filename
Type:Types/FileName
priority
Type:Types/string
Possible values:
- extra-high
- high
- medium
- low
- very-low
width
Type: Types/uint32
Width of the picture in pixels.
height
Type: Types/uint32
Height of the picture in pixels
x
Type: Types/uint32
Default: 0
Horizontal position of the picture in the source file in pixels.
y
Type: Types/uint32
Default: 0
Vertical position of the picture in the source file in pixels.
shift
Type: Types/vector
Default: {0, 0}
Used to offset the sprite in-game from its bounding box.
scale
Type: Types/double
Default: 1
Values different than 1 specify the scale of the picture on default zoom. Scale 2 means that the picture will be 2 times bigger on screen (and more pixelated).
Example
picture = { filename = "__base__/graphics/entity/basic-accumulator/basic-accumulator.png", priority = "extra-high", width = 124, height = 103, shift = {0.7, -0.2} }