Sprite Directionality

Contributed by Team Sonic.

class quest.contrib.sprite_directionality.DirectionalMixin(player_sprite_image_lr, player_sprite_image_up, player_sprite_image_down, player_scaling)[source]

A mixin for quest.sprite.Sprite that allows the sprite to face different directions depending on which direction the sprite is moving.

Parameters
  • player_sprite_image_lr (string) – file path to image for left and right player sprite image

  • player_sprite_image_up (string) – file path to up facing image

  • player_sprite_image_down (string) – file path to down facing image

  • player_scaling (int) – scale for the sprite image

on_update(game)[source]

Change texture based on player direction.