Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Linq; |
---|
4 | using System.Text; |
---|
5 | using Jypeli; |
---|
6 | |
---|
7 | namespace Levypallo |
---|
8 | { |
---|
9 | internal class Kuutio : PhysicsObject |
---|
10 | { |
---|
11 | |
---|
12 | internal int health; |
---|
13 | |
---|
14 | public static Color[] healthvarit = { Color.Green, Color.Red, Color.Purple, Color.Yellow, Color.Brown }; |
---|
15 | |
---|
16 | public Kuutio(int indexY, int indexX, int health) |
---|
17 | : base(100, 100) |
---|
18 | { |
---|
19 | |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | this.health = health; |
---|
24 | Color = healthvarit[health - 1]; |
---|
25 | X = indexX * 100 +50; |
---|
26 | Y = (indexY + 2) * 100 + 50; |
---|
27 | this.IgnoresGravity = true; |
---|
28 | this.MakeStatic(); |
---|
29 | this.Restitution = 1.5; |
---|
30 | this.Tag = "kuutio"; |
---|
31 | Levypallo.instance.Add(this); |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | |
---|
36 | } |
---|
37 | |
---|
38 | } |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.