本文整理汇总了Python中Entity.Entity._Update方法的典型用法代码示例。如果您正苦于以下问题:Python Entity._Update方法的具体用法?Python Entity._Update怎么用?Python Entity._Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity.Entity
的用法示例。
在下文中一共展示了Entity._Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _Update
# 需要导入模块: from Entity import Entity [as 别名]
# 或者: from Entity.Entity import _Update [as 别名]
def _Update(self, timeElapsed):
"""This will be where we update all of the contained entities. (This happens once per game update!)"""
#print "gonna update the cSpace."
Entity._Update(self, timeElapsed)
#print "done updating the cSpace."
for indx in xrange(len(self._pqEntities)):
#This will check to see if the current Entity has signaled to be removed.
if self._pqEntities[indx]._Is_Expired():
#So we let the entity do its cleaning up, then we remove it from the Entity_List entirely.
self._pqEntities[indx]._On_Expire()
self._Remove_Entity(self._pqEntities[indx]._Get_Name())
#We won't need to update a removed entity!
break
#Now since that this entity hasn't been removed, we'll update it.
self._pqEntities[indx]._Update(timeElapsed)