import sys, random, os
from dmd import Layer, Frame
import sdl2
from sdl2_displaymanager import sdl2_DisplayManager
import time

class Particle(object):
    def __init__(self, x, y, emitter):
        self.x = x 
        self.y = y 
        self.parent = emitter
        self.life = random.randint(int(self.parent.max_life*0.80),self.parent.max_life)

        self.dx = random.randint(-5,5)
        self.dy = random.randint(-5,5)

        # self.r = int(random.randint(0,255))
        # self.g = int(random.randint(0,255))
        # self.b = int(random.randint(0,255))

        self._r = 255
        self._g = 255