MCPcopy Index your code
hub / github.com/geekcomputers/Python / update_action

Method update_action

Street_Fighter/src/fighter.py:192–198  ·  view source on GitHub ↗
(self, new_action)

Source from the content-addressed store, hash-verified

190 target.hit = True
191
192 def update_action(self, new_action):
193 # check if the new action is different to the previous one
194 if new_action != self.action:
195 self.action = new_action
196 # update the animation settings
197 self.frame_index = 0
198 self.update_time = pygame.time.get_ticks()
199
200 def draw(self, surface):
201 img = pygame.transform.flip(self.image, self.flip, False)

Callers 1

updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected