source: 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Planet.cs @ 5398

Revision 5398, 875 bytes checked in by mijoilmo, 9 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public 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.