Revision 1861,
1.5 KB
checked in by hniemi, 12 years ago
(diff) |
No minäpä kerron tarinan.
Olipa kerran pieni nörtti, joka taisteli lohikäärmeitä vastaan. Sen pituinen se, hieman tulinen. Matti.
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Jypeli; |
---|
4 | using Jypeli.Assets; |
---|
5 | using Jypeli.Controls; |
---|
6 | using Jypeli.Effects; |
---|
7 | using Jypeli.Widgets; |
---|
8 | using AdvanceMath; |
---|
9 | |
---|
10 | namespace Pallospeli |
---|
11 | { |
---|
12 | public class Ball |
---|
13 | { |
---|
14 | private Location location; |
---|
15 | /// <summary> |
---|
16 | /// Location of ball. |
---|
17 | /// </summary> |
---|
18 | public Location Location{get {return location;}} |
---|
19 | |
---|
20 | private Color color; |
---|
21 | /// <summary> |
---|
22 | /// Color of ball |
---|
23 | /// </summary> |
---|
24 | public Color Color { get { return color; } set { color = value; } } |
---|
25 | |
---|
26 | private PhysicsObject physic; |
---|
27 | /// <summary> |
---|
28 | /// Physical presentation of this ball |
---|
29 | /// </summary> |
---|
30 | public PhysicsObject Presentation |
---|
31 | { |
---|
32 | get { return physic; } |
---|
33 | set { physic = value; } |
---|
34 | } |
---|
35 | |
---|
36 | /// <summary> |
---|
37 | /// Creates ball with given location and color |
---|
38 | /// </summary> |
---|
39 | /// <param name="x">X-coordinate</param> |
---|
40 | /// <param name="y">Y-coordinate</param> |
---|
41 | /// <param name="color">Color</param> |
---|
42 | public Ball(int x, int y, Color color) |
---|
43 | { |
---|
44 | location = new Location(x, y); |
---|
45 | this.color = color; |
---|
46 | } |
---|
47 | |
---|
48 | /// <summary> |
---|
49 | /// Creates ball with location(0,0) and given color |
---|
50 | /// </summary> |
---|
51 | /// <param name="color">Color</param> |
---|
52 | public Ball(Color color) |
---|
53 | { |
---|
54 | location = new Location(0, 0); |
---|
55 | this.color = color; |
---|
56 | } |
---|
57 | } |
---|
58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.