Add initial game code
This commit is contained in:
parent
f80a60e208
commit
1383997ebf
55 changed files with 1355 additions and 0 deletions
33
scripts/GameObjects/Star.cs
Normal file
33
scripts/GameObjects/Star.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
public partial class Star : GameObject
|
||||
{
|
||||
public enum SpectralClassType
|
||||
{
|
||||
O = 0, B = 1, A = 2, F = 3, G = 4, K = 5, M = 6
|
||||
}
|
||||
|
||||
public SpectralClassType SpectralClass { get; private set; }
|
||||
public long Diameter { get; private set; }
|
||||
|
||||
public List<GameObject> GameObjects { get; private set; }
|
||||
|
||||
public Star(string name, CoordinateVector position, GameObject parent, SpectralClassType spectralClass, long diameter)
|
||||
: base(name, position, new CoordinateVector(0, 0), parent)
|
||||
{
|
||||
this.SpectralClass = spectralClass;
|
||||
this.Diameter = diameter;
|
||||
|
||||
this.GameObjects = new List<GameObject>();
|
||||
}
|
||||
|
||||
public override void Simulate()
|
||||
{
|
||||
base.Simulate();
|
||||
|
||||
foreach (GameObject gameObject in this.GameObjects)
|
||||
{
|
||||
gameObject.Simulate();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue