Mercurial > fife-parpg
comparison demos/rpg/scripts/actors/player.py @ 519:14f777be6b94
Added a rudimentary Action class.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 27 May 2010 04:36:09 +0000 |
parents | e4cd18a179af |
children | b6bd314df28a |
comparison
equal
deleted
inserted
replaced
518:e4cd18a179af | 519:14f777be6b94 |
---|---|
33 class PlayerActionListener(ObjectActionListener): | 33 class PlayerActionListener(ObjectActionListener): |
34 def __init__(self, gamecontroller, obj): | 34 def __init__(self, gamecontroller, obj): |
35 super(PlayerActionListener, self).__init__(gamecontroller, obj) | 35 super(PlayerActionListener, self).__init__(gamecontroller, obj) |
36 | 36 |
37 def onInstanceActionFinished(self, instance, action): | 37 def onInstanceActionFinished(self, instance, action): |
38 super(PlayerActionListener, self).onInstanceActionFinished(instance, action) | |
38 if action.getId() == 'walk': | 39 if action.getId() == 'walk': |
39 print "player done walking" | 40 print "player done walking" |
40 #self._object.completeAction() | 41 #self._object.completeAction() |
41 | 42 |
42 class Player(Actor): | 43 class Player(Actor): |