예제 #1
0
        public override void Start()
        {
            atlas            = UIUtils.GetAtlas("Ingame");
            backgroundSprite = "GenericPanelWhite";

            size      = new Vector2(300, 100);
            padding   = new RectOffset(10, 10, 10, 10);
            textColor = new Color32(109, 109, 109, 255);
            textScale = 0.9f;

            wordWrap   = true;
            autoHeight = true;

            instance = this;

            Random.InitState(System.DateTime.Now.Second);
            if (Random.Range(0, 2) == 0)
            {
                m_currentTip = 0;
            }
            if (Random.Range(0, 8) == 0)
            {
                m_currentTip = m_tips.Length - 2;
            }
            NextTip();
        }
예제 #2
0
        public override void Start()
        {
            LoadResources();

            m_tipsWindow           = GetUIView().AddUIComponent(typeof(UITipsWindow)) as UITipsWindow;
            m_tipsWindow.isVisible = false;

            UIComponent bulldoserButton = GetUIView().FindUIComponent <UIComponent>("MarqueeBulldozer");

            if (bulldoserButton == null)
            {
                bulldoserButton = GetUIView().FindUIComponent <UIComponent>("BulldozerButton");
            }

            name    = "MoveIt";
            tooltip = "Move It! " + ModInfo.version;

            normalFgSprite  = "MoveIt";
            hoveredFgSprite = "MoveIt_hover";

            playAudioEvents = true;

            size = new Vector2(43, 49);

            if (savedX.value == -1000)
            {
                absolutePosition = new Vector2(bulldoserButton.absolutePosition.x - width - 5, bulldoserButton.parent.absolutePosition.y);
            }
            else
            {
                absolutePosition = new Vector2(savedX.value, savedY.value);
            }
        }
예제 #3
0
        public override void Start()
        {
            atlas            = UIUtils.GetAtlas("Ingame");
            backgroundSprite = "GenericPanelWhite";

            size      = new Vector2(300, 100);
            padding   = new RectOffset(10, 10, 10, 10);
            textColor = new Color32(109, 109, 109, 255);
            textScale = 0.9f;

            wordWrap   = true;
            autoHeight = true;

            instance = this;
        }