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

Revision 5396, 717 bytes checked in by mijoilmo, 6 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 double radius;
13    public double Radius { get { return radius; } set { radius = value; } }
14    public Planet(Proto236b parent, Vector position, double d, string levelId)
15        : base(d, d)
16    {
17        this.levelId = levelId;
18        this.Shape = Shape.Circle;
19        this.Position = position;
20        this.radius = d/2;
21        if (!parent.Galaxy.planets.ContainsKey(levelId))
22        {
23            parent.Galaxy.planets.Add(levelId, this);
24        }
25    }
26}
Note: See TracBrowser for help on using the repository browser.