private void AddSubGroup(IVesselSubGroup subGroup, bool last) { if (subGroup == null) { return; } VesselSubGroup obj = Instantiate(m_SubGroupPrefab); obj.transform.SetParent(m_SubGroupTransform, false); obj.Initialize(subGroup, this, last); }
public void Initialize(IVesselSubGroup group, VesselGroup parent, bool last) { if (group == null) { return; } _groupInterface = group; _parent = parent; _final = last; ClearUI(); AddHeader(group.SubHeader); AddVessels(group.Vessels); //Debug.Log("[BTK] Sub Group Initialize: " + group.StartOn); if (_anim != null) { _anim.SetBool("open", group.StartOn); _anim.SetBool("instant", group.Instant && group.StartOn); } if (_animRoutine != null) { StopCoroutine(_animRoutine); _animRoutine = null; } _animating = false; _animRoutine = StartCoroutine(WaitForExpand()); }