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

Revision 5412, 921 bytes checked in by mijoilmo, 7 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.Image = parent.Images[levelId];
22        this.Position = position;
23        this.music = parent.Music.PlanetMusic[levelId];
24        this.radius = d/2;
25        if (!parent.Galaxy.planets.ContainsKey(levelId))
26        {
27            parent.Galaxy.planets.Add(levelId, this);
28        }
29    }
30}
Note: See TracBrowser for help on using the repository browser.