Пример #1
0
        public void ShowBuffBaseOptions(UXCheckbox checkbox, SquadWarBuffBaseData data)
        {
            if (this.buffBaseData != null && this.buffBaseData == data)
            {
                return;
            }
            this.buffBaseData     = data;
            this.opponentState    = null;
            this.Visible          = true;
            this.transformToTrack = null;
            Vector3[] worldCorners = checkbox.GetWorldCorners();
            Vector3   position     = checkbox.Root.transform.position;

            if (worldCorners != null)
            {
                position.y = worldCorners[0].y;
            }
            this.rootTrans.position = position;
            this.animator.Play("Off", 0, 1f);
            this.animator.ResetTrigger("Off");
            this.animator.ResetTrigger("ShowTop");
            this.animator.SetTrigger("ShowBottom");
            SquadWarManager warManager = Service.Get <SquadController>().WarManager;
            string          empty      = string.Empty;

            if (warManager.CanScoutBuffBase(this.buffBaseData, ref empty))
            {
                this.scoutBuffBaseButton.VisuallyEnableButton();
                this.scoutBuffBaseLabel.TextColor = this.scoutBuffBaseLabel.OriginalTextColor;
            }
            else
            {
                this.scoutBuffBaseButton.VisuallyDisableButton();
                this.scoutBuffBaseLabel.TextColor = UXUtils.COLOR_LABEL_DISABLED;
            }
            this.PlayShowAudioClip();
        }