source: 2013/27/AkseliJ/Levypallo/Levypallo/Levypallo/Kuutio.cs @ 4406

Revision 4406, 837 bytes checked in by akansaja, 10 years ago (diff)

Talletus.

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Jypeli;
6
7namespace 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.