tighogg

fighting game for the terminal
git clone https://git.ce9e.org/tighogg.git

commit
91f6f2dbb0e15c6ad3b6cf56c0f3293e4198f8b0
parent
14e7c8c84993f3543fe0989fbf222df227cda0b9
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-09 07:40
jump animation

Diffstat

M tighogg.py 12 +++++++++++-

1 files changed, 11 insertions, 1 deletions


diff --git a/tighogg.py b/tighogg.py

@@ -99,7 +99,17 @@ class Player:
   99    99             self.dy = -JUMP_VELOCITY
  100   100 
  101   101     def _render(self):
  102    -1         if self.running:
   -1   102         if self.dy > 0:
   -1   103             yield r' __O  /'
   -1   104             yield r'   /\/ '
   -1   105             yield r'   \\  '
   -1   106             yield r'    \\ '
   -1   107         elif self.dy < 0:
   -1   108             yield r'  _O  /'
   -1   109             yield r' / |\/ '
   -1   110             yield r' _/ \  '
   -1   111             yield r'     \ '
   -1   112         elif self.running:
  103   113             if self.cycle_frame // self.cycle_duration == 0:
  104   114                 yield r'    O /'
  105   115                 yield r'   /\/ '