xsge.tmx

This module provides a simple interface for lighting.

xsge.lighting Functions

xsge.lighting.project_light(x, y, sprite, image=0)[source]

Add a light to the current frame. This must be called every frame xsge.lighting.project_darkness() is called to maintain the respective light. This function should be called before xsge.lighting.project_darkness().

Arguments:

  • x – The horizontal location of the light relative to the room.
  • y – The vertical location of the light relative to the room.
  • sprite – The sprite to use as the light. Black pixels are ignored, and all other colors make the appropriate pixel
  • image – The frame of the sprite to use, where 0 is the first frame.
xsge.lighting.project_darkness(z=100000)[source]

This function must be called every frame to maintain darkness.

Arguments:

  • z – The Z-axis position of the darkness in the room. Anything with a higher Z-axis value will not be affected.

Table Of Contents

Previous topic

xsge.gui

Next topic

xsge.path

This Page