void Start()
 {
     mainCamera          = Camera.main;
     mainCameraTransform = mainCamera.transform;
     labelPool           = LabelPool.Instance();
     CreateMap();
 }
Пример #2
0
 /// <summary>
 /// Get references to the various UI panels
 /// </summary>
 public void Initialize()
 {
     planetMenu = GameObject.FindGameObjectWithTag("PlanetMenu").GetComponent<PlanetMenuControls>();
     shipDisplay = GameObject.FindGameObjectWithTag("ShipHUD").GetComponent<ShipHUDControls>();
     uiRoot = GameObject.FindWithTag("UIRoot").GetComponent<UIRoot>();
     labelPool = GameObject.FindWithTag("LabelPool").GetComponent<LabelPool>();
 }
Пример #3
0
 void Awake()
 {
     instance         = this;
     lootLabelPool    = new LabelPool(transform);
     _lootHighlighter = new LootHighlighter(lootLabelPool);
     label            = new Label(transform);
     label.Hide();
 }
Пример #4
0
 void Awake()
 {
     instance          = this;
     pickupLabelPool   = new LabelPool(transform);
     pickupHighlighter = new PickupHighlighter(pickupLabelPool);
     label             = new Label(transform);
     label.Hide();
 }
Пример #5
0
    public static LabelPool Instance()
    {
        if (!labelPool)
        {
            labelPool = FindObjectOfType(typeof(LabelPool)) as LabelPool;
            if (!labelPool)
            {
                Debug.LogError("There needs to be one active LabelPool script on a GameObject in your scene.");
            }
        }

        return(labelPool);
    }