Example #1
0
	def update( self, t ):
		if not self.active:
			return 

		dt = (t - self.last_update)
		self.last_update = t
		
		tt = (t - self.first_time)
		ttm = pow( 0.2*math.sin( tt*math.pi )+0.6, 2.0 )
		ttm = int( 1/ttm )
		
		if ttm < 2:	ttm = 2
		if ttm > 5:	ttm = 5
		
		ttm = 5 - ttm + 2
		
		self.ttma[:,:] = ttm
		aarray = pygame.surfarray.pixels_alpha( self.surface )
		Numeric.floor_divide( self.dv, self.ttma, aarray )