Esempio n. 1
0
    public void Initialize()
    {
        _shipUI      = UI.UIMain.CreateEmptyFloater(transform);
        _initialized = true;

        ActivateState(_initialState);
    }
Esempio n. 2
0
    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();
        }
    }
Esempio n. 3
0
        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;
 }
Esempio n. 5
0
 public static void DestroyFloater(WorldSpaceFloater go)
 {
     Destroy(go.gameObject);
 }