Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
T
test-project-please-ignore
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Progetti
test-project-please-ignore
Commits
d5608b89
Commit
d5608b89
authored
Oct 21, 2018
by
Aljaž Srebrnič
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make lights go more boom
parent
18d43dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lighting.py
lighting.py
+8
-3
No files found.
lighting.py
View file @
d5608b89
...
...
@@ -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
>
2
0
:
self
.
current_rand
=
-
randint
(
1
,
4
)
if
self
.
current_color
.
green
+
self
.
current_rand
>
4
0
:
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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment