Example #1
0
 public void SetMaxHpValue(int value)
 {
     if (!hpProgressor)
     {
         maxHP = value;
         return;
     }
     hpProgressor.SetMax(value);
 }
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     save   = GameObject.FindGameObjectWithTag("SaveState").GetComponent <SaveState>();
     src    = GetComponent <AudioSource>();
     src.Play();
     timeProgressor.SetMax(maxLoseTime);
     currentPressureValue += thermalToggle.currentValue;
     currentPressureValue += lowerToggle.currentValue;
     currentPressureValue += emergencyToggle.currentValue;
     currentPressureValue += mainToggle.currentValue;
     targetPressureValue   = currentPressureValue;
 }
Example #3
0
 protected virtual void InitPersonParameters()
 {
     _personAnimator = GetComponent <PersonAnimatorDragonBones>();
     _personAnimator.AnimationTimeScale = AnimationTimeScaleParameter.Value;
     HealthParameter.OnChangeValue.AddListener(health =>
     {
         if (health >= HealthParameter.MaxValue)
         {
             health = HealthParameter.MaxValue;
         }
         HpProgressor.SetValue(health);
     });
     HpProgressor.SetMax(HealthParameter.MaxValue);
     HealthParameter.Value = HealthParameter.MaxValue;
 }
Example #4
0
 protected override void InitPersonParameters()
 {
     base.InitPersonParameters();
     EnergyParameter.OnChangeValue.AddListener(energy =>
     {
         if (energy >= EnergyParameter.MaxValue)
         {
             energy = EnergyParameter.MaxValue;
         }
         if (energy <= 0)
         {
             energy = 0;
         }
         EnergyProgressor.SetValue(energy);
     });
     EnergyProgressor.SetMax(EnergyParameter.MaxValue);
     EnergyProgressor.SetValue(EnergyParameter.Value);
     HealthParameter.OnChangeValue.AddListener(health =>
     {
         EnergyParameter.Value += EnergyParameter.MaxValue / 10;
     });
 }
Example #5
0
 public BattleStateUI updateMaxSP(int sp)
 {
     spProgressor.SetMax(sp);
     return(this);
 }
Example #6
0
 public BattleStateUI updateMaxHP(int hp)
 {
     hpProgressor.SetMax(hp);
     return(this);
 }