Пример #1
0
 def __init__(self, Name, screen, image, facing = True, position = (0,0)):
     GameObject.__init__(self, Name, screen, image, position)
     self.orig_im = self.Sprite.image
     self.orig_rect = self.Sprite.rect 
     self.Facing = facing
     self.Velocity = (0,0)
     self.Angle = 0
     self.Launched = False
Пример #2
0
 def __init__(self, screen, pieceID = 0, iswhite = True):        
     if pieceID < 8: Name = "Pawn"; Image = "Pawn.png"
     elif pieceID == 8 or pieceID == 15: Name = "Rook"; Image = "Rook.png"
     elif pieceID == 9 or pieceID == 14: Name = "Knight"; Image = "Knight.png"
     elif pieceID == 10 or pieceID == 13: Name = "Bishop"; Image = "Bishop.png"
     elif pieceID == 11: Name = "Queen"; Image = "Queen.png"
     elif pieceID == 12: Name = "King"; Image = "King.png"
     
     GameObject.__init__(self, Name, screen, Image)
     self.pieceID = pieceID
     self.isWhite = iswhite
     
     self.Row = 0
     self.Col = 0
     self.SetInitialPos()
Пример #3
0
    def __init__(self, Name, screen, image, Gun, Power, shell, facing = True, Arange = (0,180),position = (0,0)):
        GameObject.__init__(self, Name, screen, image, position)
        self.Facing = facing
        self.Gun = Gun
        self.shell = shell
    
        self.Arange = Arange
        self.Araisemode = False
        self.Alowermode = False

        self.Praisemode = False
        self.Plowermode = False
    
        self.Angle = 15
        self.Power = Power
Пример #4
0
    def __init__(self, Name, surf, alliance, pos, sensors = 50):
        
        if alliance == 0:GameObject.__init__(self, Name, surf, "swarmer-green.png", pos)
        elif alliance == 1: GameObject.__init__(self, Name, surf, "swarmer.png", pos)
        self.Sensors = sensors
        self.Alliance = alliance
        self.World = None

        self.makeTree()                    
        
        self.hitpoints = 100
        self.speed = 5
        self.atrange = Base.mean(self.Sprite.rect.size)+10
        self.atcd = 10
        self.cur_atcd = 0
        self.atdmg = 10
Пример #5
0
 def __init__(self, screen):
     GameObject.__init__(self, "Board", screen, "shell.png")
     self.tile_width = 50
     self.tile_height = 50