Esempio n. 1
0
 public void OnHpBarChange()
 {
     m_PlayerData = DungonManager.Inst.Player.Data;
     m_HpBar.GetComponent<ValBarControl>().OnValueChange(
         m_PlayerData.attrib.hp/m_PlayerData.attrib.maxHp,
         m_PlayerData.attrib.hp.ToString() + "/" + m_PlayerData.attrib.maxHp.ToString() );
 }
Esempio n. 2
0
 public void OnMpBarChange()
 {
     m_PlayerData = DungonManager.Inst.Player.Data;
     m_MpBar.GetComponent<ValBarControl>().OnValueChange(
         m_PlayerData.attrib.eng/m_PlayerData.attrib.maxEng,
         m_PlayerData.attrib.eng.ToString() + "/" + m_PlayerData.attrib.maxEng.ToString() );
 }
Esempio n. 3
0
 public void OnExpBarChange()
 {
     m_PlayerData = DungonManager.Inst.Player.Data;
     m_AttribExpBar.GetComponent<ValBarControl>().OnValueChange(
         (float)m_PlayerData.levelData.exp/m_PlayerData.levelData.levelUpExp,
         m_PlayerData.levelData.exp.ToString() + "/" + m_PlayerData.levelData.levelUpExp.ToString() );
 }
Esempio n. 4
0
        // Use this for initialization
        void Awake()
        {
            m_HpBar = gameObject.transform.FindChild("HpBar").gameObject;
            m_MpBar = gameObject.transform.FindChild("MpBar").gameObject;
            m_AttribExpBar = gameObject.transform.FindChild("AttribExpBar").gameObject;

            // 预更新一次人物状态栏
            m_PlayerData = DungonManager.Inst.Player.Data;
            OnHpBarChange();
            OnMpBarChange();
            OnExpBarChange();
        }