The SimpleShader is the main object used to put an image in a game. A shader is the image a sprite will take on. It will change depending on how the sprite is called.
The main coding for a simple shader goes like so:
simpleShaderWithTexture("X.png", "Y", Z, A);
The main coding for a simple shader goes like so:
simpleShaderWithTexture("X.png", "Y", Z, A);
- X = filepath of image file used from theme folder, usually a PNG (ex: image.png, if it's in a folder it's foldername/image.png)
- Y = the name of this shader. Used for identification when calling a sprite (covered later)
- Z = the order that this sprite appears in on it's layer (discussed later)
- A = The blend mode.
- AdditiveBlend = makes things transparent based on darkness (ex: black is entirely transparent, white is fully visible)
- AlphaBlend = makes nothing transparent except transparent pixels themselves
- SourcePlusOneMinusSourceAlphaBlend = A shiny version of AlphaBlend (as far as I can tell)
- noBlend = useless, don't use it.
The RevengeShader is a shader very similar, the only difference is that the image used for this shader changes when entering 8x/16x mode.
revengeShaderWithTextures("X.png", "X-revenge.png", "Y", Z, A);
Here there are two images loaded, one for normal mode, another for revenge mode.
After you have set up a shader, you need to make it show up by setting it up as a sprite.
revengeShaderWithTextures("X.png", "X-revenge.png", "Y", Z, A);
Here there are two images loaded, one for normal mode, another for revenge mode.
After you have set up a shader, you need to make it show up by setting it up as a sprite.