Skip to content

Sprites

James McNair edited this page Apr 14, 2019 · 1 revision

Sprites

Sprites are used for anything which moves around and needs regular updating.

Modifying sprites

All default sprites are contained in the com.booksaw.corruption.sprite package.

Creating a new sprite

Creating the class

  • Create the class: public class Foo extends Sprite
  • Edit all implementable methods and complete methods.

Adding the required references for the Sprite to be loaded

  • In SpriteList add the sprite to the enum and alter all methods to include references to the getSprite.
  • In LevelManager find the private method public void makeSprite(String ref) and modify with a custom reference for the sprite (should be the same as the reference in getName)

Clone this wiki locally