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 | |
---|
9 | public class Planet : GameObject |
---|
10 | { |
---|
11 | private string levelId; |
---|
12 | private string music; |
---|
13 | public string Music { get { return music; } set { music = value; } } |
---|
14 | private double radius; |
---|
15 | public double Radius { get { return radius; } set { radius = value; } } |
---|
16 | public Planet(Proto236b parent, Vector position, double d, string levelId) |
---|
17 | : base(d, d) |
---|
18 | { |
---|
19 | this.levelId = levelId; |
---|
20 | this.Shape = Shape.Circle; |
---|
21 | this.Position = position; |
---|
22 | this.music = parent.Music.PlanetMusic[levelId]; |
---|
23 | this.radius = d/2; |
---|
24 | if (!parent.Galaxy.planets.ContainsKey(levelId)) |
---|
25 | { |
---|
26 | parent.Galaxy.planets.Add(levelId, this); |
---|
27 | } |
---|
28 | } |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.