Exemplo n.º 1
0
 // public void LossEnegy(float lossValue)//减能量
 // {
 //     energy -= lossValue;
 //     if (energy < 0) energy = 0;
 //     EnergyValueBar.SetValue(energy / maxEnergy);
 // }
 public void ChangeEnergyValue(float getValue)//回能量,减能量
 {
     energy += getValue;
     if (energy > maxEnergy)
     {
         energy = maxEnergy;
     }
     else if (energy < 0)
     {
         energy = 0;
     }
     EnergyValueBar.SetValue(energy / maxEnergy);
 }
Exemplo n.º 2
0
    public void Die()//死亡
    {
        //if (Life == 0) return;
        life = 0;
        //隐藏血条和能量条
        EnergyValueBar.Hide(1, true);
        lifeValueBar.Hide(1, true);

        animator.SetBool("Live", false);
        //animator.Play("Die");
        canAttack = false;
        DisableMove();
        canReleaseSkills = false;
        gc.GameOver();
    }
Exemplo n.º 3
0
 public void ShowStatus()//隐藏血条和能量条
 {
     EnergyValueBar.Display(1, true);
     lifeValueBar.Display(1, true);
 }
Exemplo n.º 4
0
 public void HideStatus()//隐藏血条和能量条
 {
     EnergyValueBar.Hide(1, false);
     lifeValueBar.Hide(1, false);
 }