Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 76fb326eacb4eba86e381939b5d8609d4522ce26
parent 3a47bd203a0f22a6ce78c6e1daca28917c694690
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Fri, 18 Sep 2020 15:10:02 -0500

animated cursor

Diffstat:
Mdata/img/cursor1.png | 0
Mdata/json/anims.json | 10++++++++++
Msrc/vgo.py | 1+
3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/data/img/cursor1.png b/data/img/cursor1.png Binary files differ. diff --git a/data/json/anims.json b/data/json/anims.json @@ -10,5 +10,15 @@ { "sprite" : [2, 1], "timer" : 4 }, { "sprite" : [3, 1], "timer" : 4 } ] + }, + "cursor1" : { + "pulse" : [ + { "sprite" : [0, 0], "timer" : 3 }, + { "sprite" : [1, 0], "timer" : 3 }, + { "sprite" : [0, 1], "timer" : 3 }, + { "sprite" : [1, 1], "timer" : 3 }, + { "sprite" : [0, 1], "timer" : 3 }, + { "sprite" : [1, 0], "timer" : 3 } + ] } } diff --git a/src/vgo.py b/src/vgo.py @@ -208,6 +208,7 @@ class EntityManager(manager.Manager): Load a TileCursor object to highlight selected tiles. """ self.tile_cursor = TileCursor("Tile_Cursor", self.total_entities, self.game.sheet_manager.loaded_sheets[sheet]) + self.tile_cursor.set_animation(self.game.sheet_manager.animations["cursor1"]["pulse"], True) self.add_entity(self.tile_cursor) def position_tile_cursor(self, tile_def):