public void Initialize() { _shipUI = UI.UIMain.CreateEmptyFloater(transform); _initialized = true; ActivateState(_initialState); }
public void Initialize() { _initialized = true; _uiIcon = UI.UIMain.CreateEmptyFloater(transform); UI.UIMain.AddUIIcon(flag, _uiIcon.GetComponent <RectTransform>()); HideFlag(); var services = GetComponents <ISettlementService>(); foreach (var service in services) { service.Initialize(); } }
public WorldSpaceFloater AddWorldFloater(string prefab, Transform target) { GameObject go = Instantiate(Resources.Load("UI/" + prefab)) as GameObject; WorldSpaceFloater f = go.GetComponent <WorldSpaceFloater>(); if (f) { go.transform.SetParent(GetComponent <RectTransform>(), false); f.track = target; return(f); } else { DestroyImmediate(go); return(null); } }
public void Initialize() { _settlementActionsUI = UI.UIMain.CreateEmptyFloater(transform, -0.15f); _settlementActionsUI.drawIconsVertical = false; _initialized = true; }
public static void DestroyFloater(WorldSpaceFloater go) { Destroy(go.gameObject); }