animation play state
This commit is contained in:
parent
703dbd906d
commit
7ad159094a
|
@ -48,11 +48,14 @@ class Animation(GameChild):
|
|||
if self.accounts.has_key(method):
|
||||
self.accounts[method].halt()
|
||||
|
||||
def is_playing(self, method=None, check_all=False):
|
||||
def is_playing(self, method=None, check_all=False, include_delay=True):
|
||||
if check_all:
|
||||
return any(account.playing for method, account in
|
||||
return any(self.is_account_playing(account) for method, account in
|
||||
self.accounts.iteritems())
|
||||
return self.accounts[self.get_default(method)].playing
|
||||
return self.is_account_playing(self.accounts[self.get_default(method)])
|
||||
|
||||
def is_account_playing(self, account):
|
||||
return account.playing and not account.delay
|
||||
|
||||
def update(self):
|
||||
for method, account in self.accounts.iteritems():
|
||||
|
|
Loading…
Reference in New Issue