Exemplo n.º 1
0
    def __init__(self):
        super(E3Animation, self).__init__()
        image = images["E3"]
        offsetx, offsety = 57, 37
        self.originalAnimation = "runsw"
        width, height = 118, 72
        playeroffset = 504

        y, m, n = 0, 1, 1
        self.addAnimationFromSpriteSheetDir(image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "stand")
        y, m, n = 216, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "run", False, "stand"
        )
        y, m, n = 288, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "crawl", False, "stand"
        )
        y, m, n = 360, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "attack", False, "stand"
        )
        y, m, n = 432, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "crawlattack", False, "stand"
        )
        x, y, m, n = 2220, 144, 15, 1
        self.addAnimationFromSpriteSheet(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "die1", False
        )
        x, y, m, n = 3330, 144, 15, 1
        self.addAnimationFromSpriteSheet(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "die2", False
        )

        x, y, m, n = 1110, 72, 15, 1
        for player in range(2):
            animation = Animation()
            animation.addImageSpriteSheet(image, x, y, width, height, m, n, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("cheer_%d" % (player), animation)
            y += playeroffset

        x, y, m, n = 0, 72, 15, 1
        for player in range(2):
            animation = Animation()
            animation.addImageSpriteSheet(image, x, y, width, height, m, n, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("squeez_%d" % (player), animation)
            y += playeroffset
Exemplo n.º 2
0
    def __init__(self):
        super(AdogAnimation, self).__init__()
        image = images["adog"]
        offsetx, offsety = 36, 38
        self.originalAnimation = "runsw"
        width, height = 74, 72
        playeroffset = 288

        y, m, n = 0, 1, 1
        self.addAnimationFromSpriteSheetDir(image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "stand")
        y, m, n = 72, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "run", False, "stand"
        )
        y, m, n = 216, 6, 1
        self.addAnimationFromSpriteSheetDir(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "attack", False, "stand"
        )
        x, y, m, n = 2220, 144, 15, 1
        self.addAnimationFromSpriteSheet(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "die1", False
        )
        x, y, m, n = 3330, 144, 15, 1
        self.addAnimationFromSpriteSheet(
            image, 0, y, width, height, m, n, offsetx, offsety, playeroffset, "die2", False
        )

        x, y, m, n = 0, 144, 15, 1
        for player in range(2):
            animation = Animation()
            animation.addImageSpriteSheet(image, x, y, width, height, m, n, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("tail_%d" % (player), animation)
            y += playeroffset

        x, y, m, n = 1110, 144, 15, 1
        for player in range(2):
            animation = Animation()
            animation.addImageSpriteSheet(image, x, y, width, height, m, n, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("squeez_%d" % (player), animation)
            y += playeroffset
Exemplo n.º 3
0
	def __init__(self):
		super(MCVAnimation,self).__init__()
		image = images["mcv"]
		offsetx,offsety = 94,77
		self.originalAnimation = "standne"
		width,height = 188,154
		playeroffset = 154
		
		y,m,n = 0,1,1
		for player in range(2):
			x = 0
			for direction in ["w","sw","s","se","e","ne","n","nw"]:
				animation = Animation()
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				self.addAnimation("stand%s_%d"%(direction,player),animation)
				x += width * m * 2
			y += playeroffset
		
		y,m,n = 0,1,1
		for player in range(2):
			x = 0
			for direction in ["w","sw","s","se","e","ne","n","nw"]:
				animation = Animation()
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
				animation.loop = False
				animation.next = self.getAnimation("stand%s_%d"%(direction,player))
				self.addAnimation("run%s_%d"%(direction,player),animation)
				x += width * m * 2
			y += playeroffset
		
		x,y,m,n = 0,0,16,1
		for player in range(2):
			animation = Animation()
			animation.addImageSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety)
			animation.loop = False
			self.addAnimation("expand_%d"%(player),animation)
			y += playeroffset
Exemplo n.º 4
0
 def __init__(self):
     super(GcnstAnimation,self).__init__()
     image = images["gcnst"]
     offsetx,offsety = 213,263
     self.originalAnimation = "build"
     width,height = 426,339
     playeroffset = 1356
     
     x,y,i0,j0,left,right,count = 0,678,0,0,0,20,29
     for player in range(numofplayer):
         animation = Animation()
         animation.addBrokenSpriteSheet(image,x,y,i0,j0,width,height,left,right,count,offsetx,offsety)
         animation.loop = False
         self.addAnimation("build_%d"%player,animation)
         y += playeroffset
     
     x,y,m,n = 0,0,20,1
     self.addAnimationFromSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety,playeroffset,"normal",True,None,"build")
     x,y,m,n = 0,339,20,1
     self.addAnimationFromSpriteSheet(image,x,y,width,height,m,n,offsetx,offsety,playeroffset,"destroy")
Exemplo n.º 5
0
    def __init__(self):
        super(EngineerAnimation, self).__init__()
        image = images["engineer"]
        offsetx, offsety = 37, 38
        self.originalAnimation = "runsw"
        width, height = 76, 80
        playeroffset = 880
        left, right = 0, 23
        x, y = 0, 0

        for player in range(2):
            i0, j0 = 0, 0

            count = 1
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                self.addAnimation("stand%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 6
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                animation.loop = False
                animation.next = self.getAnimation("stand%s_%d" % (direction, player))
                self.addAnimation("run%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 15
            animation = Animation()
            animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("stool_%d" % (player), animation)
            i0 += count
            j0 += i0 / right
            i0 %= right

            count = 15
            animation = Animation()
            animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
            animation.loop = False
            animation.next = self.getAnimation("standsw_%d" % (player))
            self.addAnimation("read_%d" % (player), animation)
            i0 += count
            j0 += i0 / right
            i0 %= right

            count = 6
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                animation.loop = False
                animation.next = self.getAnimation("stand%s_%d" % (direction, player))
                self.addAnimation("crawl%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 15
            animation = Animation()
            animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
            animation.loop = False
            self.addAnimation("die1_%d" % (player), animation)
            i0 += count
            j0 += i0 / right
            i0 %= right

            count = 15
            animation = Animation()
            animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
            animation.loop = False
            self.addAnimation("die2_%d" % (player), animation)
            i0 += count
            j0 += i0 / right
            i0 %= right

            count = 6
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                animation.loop = False
                animation.next = self.getAnimation("stand%s_%d" % (direction, player))
                self.addAnimation("search%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 2
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                animation.loop = False
                self.addAnimation("getdown%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 2
            for direction in directions:
                animation = Animation()
                animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
                animation.loop = False
                animation.next = self.getAnimation("stand%s_%d" % (direction, player))
                self.addAnimation("getup%s_%d" % (direction, player), animation)
                i0 += count
                j0 += i0 / right
                i0 %= right

            count = 9
            animation = Animation()
            animation.addBrokenSpriteSheet(image, x, y, i0, j0, width, height, left, right, count, offsetx, offsety)
            animation.loop = False
            self.addAnimation("cheer_%d" % (player), animation)
            i0 += count
            j0 += i0 / right
            i0 %= right

            y += playeroffset