Exemple #1
0
    protected override void LiveBarInit()
    {
        float xueTiaoDiW = XueTiaoDi.GetComponent <RectTransform>().rect.width;

        _maxW = xueTiaoDiW - XueTiaoXianshiWucha;
        _w    = _w2 = _maxW;
        Wh(MaskImg, _maxW, MaskImg.GetComponent <RectTransform>().rect.height);
        WhBg(xueBg);
        if (zzTiao)
        {
            WhBg(zzTiao);
        }
        //if (zzXueBg) Wh(zzXueBg, _maxW * 0.3f, _h);
        //Wh(zzXueBg, _maxW, _h);
        Wh(xue1, _maxW, _h);
        //Wh(xue2, _maxW, _h);
        //是否包含诅咒条 有的话先初始为不显示
        //if (zzTiao) GlobalTools.CanvasGroupAlpha(zzTiao.GetComponent<CanvasGroup>(), 0);
    }
Exemple #2
0
    // Start is called before the first frame update
    //GameObject _player;

    void Start()
    {
        if (IsLeft)
        {
            maxCDDistance = MaskImg.GetComponent <RectTransform>().rect.width;
        }
        else
        {
            maxCDDistance = MaskImg.GetComponent <RectTransform>().rect.height;
        }
        //_player = GlobalTools.FindObjByName("player");
        //skillCanUseTimes = SkillCanUseNums;
        //初始化 技能可用次数的 显示文本
        //SetText(skillCanUseTimes.ToString());

        //设置 默认 遮罩地板颜色
        Color _col = new Color(66 / 255f, 66 / 255f, 66 / 255f, 1);

        SetImgColor(TheMask, _col);
        Init();
    }
Exemple #3
0
    public override void AddMaxLiveBar(float AddLivesNum)
    {
        if (XueTiaoDi == null)
        {
            return;
        }
        float OldMaxLive = _maxLive;

        _maxLive += AddLivesNum;
        if (!isCanAddMaxLiveNum)
        {
            return;
        }
        float NewMaxW = 0;

        NewMaxW = _maxW * _maxLive / OldMaxLive;
        _maxW   = NewMaxW;
        //print(" XueTiaoDi  "+ XueTiaoDi);
        Wh(XueTiaoDi, _maxW + 50, XueTiaoDi.GetComponent <RectTransform>().rect.height);
        Wh(MaskImg, _maxW, MaskImg.GetComponent <RectTransform>().rect.height);
        //if (zzTiao) WhBg(zzTiao);
        //if (zzXueBg) Wh(zzXueBg, _maxW * 0.3f, _h);
        WhBg(xueBg);
    }