// 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); }
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(); }
public void ShowStatus()//隐藏血条和能量条 { EnergyValueBar.Display(1, true); lifeValueBar.Display(1, true); }
public void HideStatus()//隐藏血条和能量条 { EnergyValueBar.Hide(1, false); lifeValueBar.Hide(1, false); }