import pygame
import globals
import ParticleEmitter

class Element:
	def __init__(self, position, radius):
		self.position = position
		self.radius = radius
		self.emitter = ParticleEmitter.Emitter(position, globals.String_Particle)

		self.is_activated = False
		self.timer = 0

	def activate(self):
		self.is_activated == True
		self.timer = 10

	def Update(self, ms):
		self.emitter.Update(ms)

	def draw(self, ms):
		self.emitter.Draw()
		
		#~ if self.is_activated == False:
			#~ pygame.draw.circle(globals.screen, globals.white, self.position, int(self.radius), 1)
			#~ pygame.draw.circle(globals.screen, globals.white, self.position, int(self.radius * 0.8), 1)
		#~ else:
			#~ pygame.draw.circle(globals.screen, globals.red, self.position, int(self.radius), 1)
			#~ pygame.draw.circle(globals.screen, globals.red, self.position, int(self.radius * 0.8), 1)

		self.timer = self.timer - 1
		if self.timer == 0:
			self.is_activated = False