示例#1
0
 private void SetSoulInit()
 {
     m_SoulMax        = 100;
     m_SoulNow        = 0;
     m_SoulValue.text = GameTools.GetBarValueText(m_SoulNow, m_SoulMax);
     m_SoulBar.value  = m_SoulNow / (float)m_SoulMax;
 }
示例#2
0
 private void SetHpInit()
 {
     m_HpMax        = m_PlayerData.m_Hp;
     m_HpNow        = m_PlayerData.m_Hp;
     m_HpValue.text = GameTools.GetBarValueText(m_HpNow, m_HpMax);
     m_HpBar.value  = m_HpNow / m_HpMax;
 }
示例#3
0
 public void OnEatSoul(float value)
 {
     m_ActionEffectImage.color = new Color(m_EffectColorSoul.r, m_EffectColorSoul.g, m_EffectColorSoul.b, 0.5f);
     m_ActionType = ActionType.ADD_SOUL;
     m_SoulNow   += (int)value;
     if (m_SoulNow >= 1000)
     {
         SceneManager.LoadScene(0);
         return;
     }
     m_SoulValue.text = GameTools.GetBarValueText(m_SoulNow, m_SoulMax);
     m_SoulBar.value  = m_SoulNow / (float)m_SoulMax;
 }
示例#4
0
 public void OnHurt(float value)
 {
     m_ActionEffectImage.color = new Color(m_EffectColorHurt.r, m_EffectColorHurt.g, m_EffectColorHurt.b, 0.5f);
     m_ActionType = ActionType.HURT;
     m_HpNow     -= value;
     if (m_HpNow <= 0)
     {
         SceneManager.LoadScene(0);
         return;
     }
     m_HpValue.text = GameTools.GetBarValueText(m_HpNow, m_HpMax);
     m_HpBar.value  = m_HpNow / m_HpMax;
 }