source: 2011/23/hniemi/Pallospeli/Pallospeli/Pallospeli/Ball.cs @ 1861

Revision 1861, 1.5 KB checked in by hniemi, 8 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 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8using AdvanceMath;
9
10namespace 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.