void AllocateSlot(ref SolarSlot slot, ref int idx, ref int seek, Mode0Navigator nav, Mode1Lookup lookup, RectTransform pin, SolarOrbitRenderer rend) { var meta = detail.metadata; if (slot == null || seek >= meta.SlotCounts [idx]) { if (slot) { slot.SetUp(); } slot = pinParent.gameObject.AddComponent <SolarSlot> (); idx++; seek = 0; var count = meta.SlotCounts [idx]; slot.buttons = new RectTransform[count]; slot.orbits = new SolarOrbitRenderer[count]; slot.caption = meta.SlotCaptions [idx]; slot.camDistance = meta.SlotDistances [idx]; slot.satelliteButtons = new RectTransforms[count]; nav.slots [idx] = slot; } slot.orbits [seek] = rend; slot.buttons [seek] = pin; slot.satelliteButtons [seek] = pin4Satellites(rend, lookup); pin.SetParent(pinParent, false); seek++; }
public void SetUp(Mode0Navigator ev, SolarOrbit id, Color clr, string cap) { navigator = ev; isNavigatorPin = true; pinData = id; thumbnail.color = clr; caption.text = cap; }
public void SetUpInvisible(Mode0Navigator ev, SolarOrbit id) { navigator = ev; isNavigatorPin = true; pinData = id; GetComponent <RectTransform>().sizeDelta = Vector2.one * 110f; caption.enabled = false; thumbnail.enabled = false; }