using System.Collections.Generic; public partial class Planet : GameObject { public bool IsMoon { get; private set; } public long Diameter { get; private set; } public List OrbitingGameObjects { get; private set; } public List PlanetGameObjects { get; private set; } public Planet(string name, CoordinateVector position, GameObject parent, bool isMoon, long diameter) : base(name, position, new CoordinateVector(0, 0), parent) { this.IsMoon = isMoon; this.Diameter = diameter; this.OrbitingGameObjects = new List(); this.PlanetGameObjects = new List(); } public override void Simulate() { base.Simulate(); foreach (GameObject gameObject in this.OrbitingGameObjects) { gameObject.Simulate(); } foreach (GameObject gameObject in this.PlanetGameObjects) { gameObject.Simulate(); } } }