示例#1
0
文件: door.py 项目: IwfY/TkStein3d
 def __init__(self, gameManager, gameMap, coordinate, edgeLength, rotation):
     MapObject.__init__(self, gameMap)
     
     self.state = Door.STATE_CLOSING
     self.edgeLength = edgeLength
     self.height = - self.edgeLength / 2
     self.rotation = rotation
     
     i, j = coordinate
     self.characterNearCondition = CharacterNearCondition(
                       gameManager,
                       Point3D((i + 0.5) * self.edgeLength,
                               0,
                               (j + 0.5) * self.edgeLength),
                       self.edgeLength * 2)
     
     self.createPolygons(coordinate, self.edgeLength)
示例#2
0
 def __init__(self, gameMap, character):
     MapObject.__init__(self, gameMap)
     self.character = character
     
     self.tick()