public _celestialObject(CelestialObject planet, int id) { this.id = id; position = planet.GetPosition(); velocity = planet.velocity; staticBody = planet.staticBody; mass = planet.mass; RotationSim rot = planet.gameObject.GetComponent <RotationSim>(); if (rot != null) { rotation = rot.GetRotation(); } else { rotation = new float[] { 0f, 0f }; } name = planet.GetName(); textTranslation = planet.textTranslation; weightMultiplier = planet.weightMultiplier; }