Commit d5608b89 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Make lights go more boom

parent 18d43dc4
......@@ -25,6 +25,7 @@ class Color:
class ColorManager(Thread):
pow_time = 10000
current_rand = 1
current_color = Color(0, 0, 0)
stato = 0
......@@ -54,8 +55,8 @@ class ColorManager(Thread):
def power(self):
if self.current_color.green + self.current_rand > 20:
self.current_rand = -randint(1, 4)
if self.current_color.green + self.current_rand > 40:
self.current_rand = -randint(1, 8)
self.current_color = Color(30, 255, 0)
elif self.current_color.green + self.current_rand < 0:
self.current_rand = randint(1, 8)
......@@ -63,7 +64,10 @@ class ColorManager(Thread):
else:
self.current_color.green += self.current_rand
self.current_color.red = 255
if self.pow_time < 0 : self.stato = 0
if self.pow_time < 0:
self.stato = 0
else:
self.pow_time -= 1
def fade(self):
......@@ -83,6 +87,7 @@ class ColorManager(Thread):
def start_pow(self):
self.stato = 1
self.pow_time = 10000
def run(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment