Data members Summary:
Variable: active Is the entity active? If set to SG_TRUE, the Entity can take events, otherwise it is skipped.
Variable: pausable Is the entity pausable? If set to SG_TRUE, then the entity is skipped during event handling if the game is paused.
Variable: event Entity event handle.
void * data
Variable: data User-provided data.
Variable: visible Is the entity visible? If an entity is invisible, it is not automatically drawn.
Variable: sprite The attached sprite.
Variable: mask The attached mask.
Variable: body The attached physics body.
Variable: source The attached audio source.
float x
Variables: x,y Entity's position.
float y
float depth
Variable: depth Entity's depth, used for drawing order.
float angle
Variable: angle Entity's angle in radians.
Variable: minside Set to SG_TRUE if the mouse was inside in the previous iteration.
SGbool (*)( SGEntity *, float, float) cbInside
Variable: cbInside Is the point considered to be inside the entity? Returns: SG_TRUE if the point is inside and SG_FALSE otherwise.
Variable: lcDestroy The entity is about to be destroyed.
Variables: lcMouse* Mouse-related local events.
Variables: Init/deinit Called just after or just before , respectively.
Variables: Looping These are called regarding iterations in SIEGE.
Variables: evWindow* Window-related events.
Variables: evMouse* Mouse-related global events.
Variables: evKeyboard* Keyboard-related events.
Variables: evJoystick* Joystick-related events.
Variables: evLevel* Level-related events.
Data members Details:
Variable: active Is the entity active? If set to SG_TRUE, the Entity can take events, otherwise it is skipped.
Variable: pausable Is the entity pausable? If set to SG_TRUE, then the entity is skipped during event handling if the game is paused.
Variable: event Entity event handle. This provides a handle for handling the entity's events. Warning: For internal use only.
void * data
Variable: data User-provided data. Note: Do not forget to free the data before destroying the entity if required - SIEGE handles this as an opaque pointer and thus will not do *anything* with this data.
Variable: visible Is the entity visible? If an entity is invisible, it is not automatically drawn. This does not affect manually drawing the entity via .
Variable: sprite The attached sprite. Warning: For internal use only.
Variable: mask The attached mask. Warning: For internal use only.
Variable: body The attached physics body. Warning: For internal use only.
Variable: source The attached audio source. Warning: For internal use only.
float x
Variables: x,y Entity's position. x - horizontal position y - vertical position Note: Not used if a body is attached. Warning: For internal use only.
float depth
Variable: depth Entity's depth, used for drawing order. Warning: For internal use only.
float angle
Variable: angle Entity's angle in radians. Note: Not used if a body is attached. Warning: For internal use only.
Variable: minside Set to SG_TRUE if the mouse was inside in the previous iteration. Will be used to implement and . Warning: For internal use only.
SGbool (*)( SGEntity *, float, float) cbInside
Variable: cbInside Is the point considered to be inside the entity? Returns: SG_TRUE if the point is inside and SG_FALSE otherwise.
Variable: lcDestroy The entity is about to be destroyed.
Variables: lcMouse* Mouse-related local events. lcMouseEnter - Mouse has just entered the entity's area lcMouseExit - Mouse has just leaved the entity's area lcMouseButton - A mouse button is being held over the object lcMouseButtonPress - A mouse button has just been pressed over the object lcMouseButtonRelease - A mouse button has just been released over the object lcMouseButtonLeft - Left mouse button is being held over the object lcMouseButtonLeftPress - Left mouse button has just been pressed over the object lcMouseButtonLeftRelease - Left mouse button has just been released over the object lcMouseButtonRight - Right mouse button is being held over the object lcMouseButtonRightPress - Right mouse button has just been pressed over the object lcMouseButtonRightRelease - Right mouse button has just been released over the object lcMouseButtonMiddle - Middle mouse button is being held over the object lcMouseButtonMiddlePress - Middle mouse button has just been pressed over the object lcMouseButtonMiddleRelease - Middle mouse button has just been released over the object lcMouseMove - The mouse has just been moved over the object lcMouseWheel - The mouse wheel has just been scrolled over the object Parameters: entity - The entity which is receiving the message button - The mouse button x, y - New mouse position wheel - New mouse wheel position TODO: - Should two entities with the same depth both get this called if applicable? - Should lcMouseExit be renamed to lcMouseLeave?
Variables: Init/deinit Called just after or just before , respectively. evInit - Called on evDeinit - Called on Parameters: entity - The entity which is receiving the message
Variables: Looping These are called regarding iterations in SIEGE. evStart - Called on the first loop, when is first called or on evExit - Called before exiting SIEGE loop, usually on evTick - Second event called in each loop evTickBegin - First event called in each loop evTickEnd - Third event called in each loop evDraw - Fourth event called in each loop - drawing (but nothing else!) should be done here Parameters: entity - The entity which is receiving the message
Variables: evWindow* Window-related events. evWindowOpen - The window has just been opened evWindowClose - The window has just been closed evWindowResize - The window has been resized Parameters: entity - The entity which is receiving the message width, height - The new window size
Variables: evMouse* Mouse-related global events. evMouseButton - A mouse button is being held down evMouseButtonPress - A mouse button has just been pressed evMouseButtonRelease - A mouse button has just been released evMouseButtonLeft - Left mouse button is being held down evMouseButtonLeftPress - Left mouse button has just been pressed evMouseButtonLeftRelease - Left mouse button has just been released evMouseButtonRight - Right mouse button is being held down evMouseButtonRightPress - Right mouse button has just been pressed evMouseButtonRightRelease - Right mouse button has just been released evMouseButtonMiddle - Middle mouse button is being held down evMouseButtonMiddlePress - Middle mouse button has just been pressed evMouseButtonMiddleRelease - Middle mouse button has just been released evMouseMove - The mouse has just been moved evMouseWheel - The mouse wheel has just been scrolled Parameters: entity - The entity which is receiving the message button - The mouse button x, y - New mouse position wheel - New mouse wheel position
Variables: evKeyboard* Keyboard-related events. evKeyboardKey - A key is being held down evKeyboardKeyPress - A key has just been pressed evKeyboardKeyRelease - A key has just been released evKeyboardKeyRepeat - A key repeat according to the key repeat interval evKeyboardKeyPress - A key representing a character has just been pressed evKeyboardKeyRepeat - A key representing a character has just been repeated according to the key repeat interval Parameters: entity - The entity which is receiving the message key - The key that triggered the event chr - The UTF-32 character that triggered the event
Variables: evJoystick* Joystick-related events. evJoystickButton - A joystick button is being held down evJoystickButtonPress - A joystick button has just been pressed evJoystickButtonRelease - A joystick button has just been released evJoystickMode - The joystick axis have moved Parameters: entity - The entity which is receiving the message joy - The joystick ID button - The button ID axis - The axis positions numaxis - The number of axis
Variables: evLevel* Level-related events. evLevelStart - A level has just loaded and started evLevelEnd - A level has just ended Parameters: entity - The entity which is receiving the message