Пример #1
0
        public override void Start()
        {
            name            = nameof(RoundButton);
            normalBgSprite  = NormalBgSprite;
            hoveredBgSprite = HoveredBgSprite;

            Vector2 resolution = UIView.GetAView().GetScreenResolution();
            var     pos        = new Vector2((145f), (resolution.y * 4 / 5) - 50);
            Rect    rect       = new Rect(pos.x, pos.y, 30, 30);

            SpriteUtility.ClampRectToScreen(ref rect, resolution);

            absolutePosition = rect.position;
            size             = new Vector2(30f, 30f);

            atlas  = SpriteUtility.GetAtlas(Loader.AtlasName);
            zOrder = 11;

            eventClick += RoundButtonClick;
        }