idle-starship/scripts/GameObjects/Star.cs
2025-09-12 08:34:06 -04:00

33 lines
879 B
C#

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();
}
}
}