Beispiel #1
0
	def __init__(self,x,y,pygame,surface,windowHeight,windowWidth):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)
		self.basey = y
		self.y = y
		self.beginX = x
		
		self.loadImages()
		self.setInitialPosition()

		self.speed = 3
		self.strategies = [ "SINUS", "STRAIGHT" ]
		self.strategy = None
		self.angle = None

		self.setStrategy()

		self.font = self.pygame.font.Font("assets/christmasFont.ttf", 20)
		self.strategyText = None
		self.strategyTextPos = None

		self.updateStrategyText()

		self.fallSpeed = 9
		self.isHit = False

		self.broom = None
		self.landingAnimation = None
Beispiel #2
0
	def __init__(self,x,y,pygame,surface,windowWidth,windowHeigth,speed):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeigth)
	
		self.speed = speed

		self.loadImages()
		self.setInitialPosition()
Beispiel #3
0
	def __init__(self,x,y,pygame,surface,windowHeight,windowWidth):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)
		
		self.loadImages()
		
		self.xSpeed = random.randint(-2,4)
		self.ySpeed = 9
Beispiel #4
0
	def __init__(self,x,y,pygame,surface,windowHeight,windowWidth,creationTick):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)
		self.creationTick = creationTick
		self.font = self.pygame.font.Font("assets/font.ttf", 50)
		self.text = self.font.render("+10!", 1, (10, 10, 10))
		self.pos = self.text.get_rect()
		self.scorePos.x = self.x
		self.scorePos.y = self.y

		self.interval = 5000
Beispiel #5
0
	def __init__(self,x,y,pygame,surface,windowWidth,windowHeight,player):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)

		self.firing = False
		self.bullets = []
		self.bulletSpeed = 10

		self.player = player

		self.yOffset = y
		self.offsetTimer = 400
		self.lastOffsetChange = 0
		self.offset = 0
		self.offsetRange = 5

		self.image = None
		self.width = None
		self.height = None

		self.loadImages()
		self.setInitialPosition()
Beispiel #6
0
	def __init__(self,x,y,pygame,surface,windowWidth,windowHeight):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)
		self.x = x	
		self.pygame = pygame
		self.surface = surface
		self.windowHeight = windowHeight
		self.windowWidth = windowWidth

		self.image = None
		self.frameWidth = 175
		self.frameHeight = 250
		self.framesStartX = 0
		self.framesStartY = 0

		self.landingTick = None
		self.landingAnimationInterval = 50
		self.numberOfLandingAnimationFrames = 13
		self.currentFrameNumber = 0

		self.width = None
		self.height = None
		self.loadImages()
		self.y = self.windowHeight - (self.frameHeight - 10)
Beispiel #7
0
	def __init__(self,x,y,pygame,surface,windowHeight,windowWidth):
		GameObject.__init__(self,x,y,pygame,surface,windowWidth,windowHeight)
		self.basey = y
		self.loadImages()
		self.speed = 1
		self.destinationCelebration = None