Conditions | 5 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from pypen import * |
||
15 | def update(self): |
||
16 | save() |
||
|
|||
17 | translate(self.x, self.y) |
||
18 | rotate(TIME) |
||
19 | |||
20 | self.color = "#fe3060" if sqrt((self.x-MOUSE.x)**2 + (self.y-MOUSE.y)**2) <= 100 else "#383838" |
||
21 | |||
22 | if self.variation > 0.5: |
||
23 | rotate(90) |
||
24 | |||
25 | if self.type == 0: |
||
26 | self.rectangle() |
||
27 | |||
28 | elif self.type == 1: |
||
29 | self.circle() |
||
30 | |||
31 | restore() |
||
32 | |||
62 |