예제 #1
0
    private void SetHP(float hpend)
    {
        HPBar.max = roleController._roleData.HpMax;
        HPTweener?.Kill();
        HPBar.DoValue(hpend, ((float)HPBar.value - hpend) / roleController._roleData.HpMax);
        HPTweener.OnComplete(() => { HPTweener = null; });

        HPText.text = hpend.ToString();
    }
예제 #2
0
        private void SetPlayer1Exp(object[] objects)
        {
            int value = (int)objects[0];

            progressBar_mp.max = RoleUpgradeDataAsset.Instance.GetExp(player1Controller.RoleData.level + 1);

            tweener_progressBar_mp?.Kill();
            tweener_progressBar_mp = progressBar_mp.DoValue((float)value, 0.5f);
            tweener_progressBar_mp.OnComplete(() => { tweener_progressBar_mp = null; });
        }
예제 #3
0
        private void SetPlayer1Vigor(object[] objects)
        {
            float value    = (float)objects[0];
            float valueMax = (float)objects[1];

            progressBar_tili.max = valueMax;

            tweener_progressBar_tili?.Kill();
            tweener_progressBar_tili = progressBar_tili.DoValue((float)value, 0.5f);
            tweener_progressBar_tili.OnComplete(() => { tweener_progressBar_tili = null; });
        }
예제 #4
0
        private void SetPlayer1Mp(object[] objects)
        {
            float value = (float)objects[0];
            float max   = (float)objects[1];

            progressBar_mp.max = max;

            tweener_progressBar_mp?.Kill();
            tweener_progressBar_mp = progressBar_mp.DoValue((float)value, (value - (float)progressBar_mp.value) / max);
            tweener_progressBar_mp.OnComplete(() =>
            {
                tweener_progressBar_mp = null;
            });
        }
예제 #5
0
        private void SetPlayer1FinalHp(object[] objects)
        {
            float value    = (float)objects[0];
            float valueMax = (float)objects[1];

            progressBar_hp.max = valueMax;

            if (tweener_progressBar_hp != null)
            {
                TweenExtensions.Kill(tweener_progressBar_hp);
            }

            tweener_progressBar_hp =
                progressBar_hp.DoValue((float)value, 0.3f);
            tweener_progressBar_hp.OnComplete(() => { tweener_progressBar_hp = null; });
        }
예제 #6
0
        private void SetBossHp(object[] objects)
        {
            float valueHpMax = ((float)objects[1]).Range(0, 9999999);
            float valueHP    = ((float)objects[0]).Range(0, valueHpMax);

            bosshpg.text = valueHP + "/" + valueHpMax;

            bossProgressBar.max = valueHpMax;

            if (tweener_progressBar_BossHp != null)
            {
                TweenExtensions.Kill(tweener_progressBar_BossHp);
            }
            tweener_progressBar_BossHp = bossProgressBar.DoValue(valueHP, 0.3f).OnComplete(() =>
            {
                tweener_progressBar_BossHp = null;
            });
        }