Beispiel #1
0
        private void Start()
        {
            try
            {
                if (instance == null)
                {
                    instance = this;
                }
                else
                {
                    Destroy(gameObject);
                    return;
                }
                terrainmanager = Singleton <TerrainManager> .instance;

                defaultstyle = new FireworkStyle();

                LoadSaved();
                if (!initialized)
                {
                    initialized = true;
                    FireworksUI.Init();
                    ExtractResources();
                    StartCoroutine(LoadResources());
                }
            }
            catch (System.Exception ex)
            {
                LogErr("[startERR]" + ex.ToString() + "  -|-  " + ex.StackTrace);
            }
        }
Beispiel #2
0
        public override void Start()
        {
            base.Start();

            atlas = FireworksUI.GetAtlas("Ingame");
            //size = FireworksUI.panel_size;
            backgroundSprite = "GenericPanel";
            position         = new Vector3(FireworksManager.instance.panelX.value, FireworksManager.instance.panelY.value, 0);
            gameObject.SetActive(false);
        }
        public override void Start()
        {
            base.Start();

            atlas           = FireworksUI.GetAtlas("Ingame");
            size            = new Vector2(35f, 35f);
            textScale       = 0.8f;
            text            = "F";
            normalBgSprite  = "InfoIconBaseNormal";
            hoveredBgSprite = "InfoIconBaseHovered";
            pressedBgSprite = "InfoIconBasePressed";
            canFocus        = false;
            position        = new Vector3(FireworksManager.instance.btnX.value, FireworksManager.instance.btnY.value);
        }
 protected override void OnMouseUp(UIMouseEventParameter p)
 {
     if (!dragging)
     {
         FireworksUI.RefreshPrefabName();
         FireworksUI.RefreshColor();
         FireworksUI.panel_main.gameObject.SetActive(!FireworksUI.panel_main.gameObject.activeInHierarchy);
     }
     else
     {
         FireworksManager.instance.btnX.value = position.x;
         FireworksManager.instance.btnY.value = position.y;
     }
     mouse_down = false;
     dragging   = false;
 }