示例#1
0
 void Update()
 {
     GameUI.Instance.mCSUI_MainWndCtrl.TrainUI.UpdateTraineeSkillsShow(m_Npc);
     GameUI.Instance.mCSUI_MainWndCtrl.TrainUI.Reflashpackage();
     if (m_Npc == null)
     {
         GameUI.Instance.mCSUI_MainWndCtrl.TrainUI.SetServantInfo("--", PeSex.Male, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
         GameUI.Instance.mCSUI_MainWndCtrl.TrainUI.SetSprSex("null");
     }
     else
     {
         GameUI.Instance.mCSUI_MainWndCtrl.TrainUI.SetServantInfo(m_Npc.FullName, m_Npc.Sex, (int)m_Npc.GetAttribute(AttribType.Hp),
                                                                  (int)m_Npc.GetAttribute(AttribType.HpMax), (int)m_Npc.GetAttribute(AttribType.Stamina), (int)m_Npc.GetAttribute(AttribType.StaminaMax),
                                                                  (int)m_Npc.GetAttribute(AttribType.Hunger), (int)m_Npc.GetAttribute(AttribType.HungerMax), (int)m_Npc.GetAttribute(AttribType.Comfort),
                                                                  (int)m_Npc.GetAttribute(AttribType.ComfortMax), (int)m_Npc.GetAttribute(AttribType.Oxygen), (int)m_Npc.GetAttribute(AttribType.OxygenMax),
                                                                  (int)m_Npc.GetAttribute(AttribType.Shield), (int)m_Npc.GetAttribute(AttribType.ShieldMax), (int)m_Npc.GetAttribute(AttribType.Energy),
                                                                  (int)m_Npc.GetAttribute(AttribType.EnergyMax), (int)m_Npc.GetAttribute(AttribType.Atk), (int)m_Npc.GetAttribute(AttribType.Def));
     }
 }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        //		if (m_RefNpc == null)
        //		{
        //			m_NameUI.text		= "";
        //			m_LifeUI.text		= "0/0";
        //			m_StaminaUI.text	= "0/0";
        //			m_OxygenUI.text		= "0/0";
        //			m_ShieldUI.text		= "0/0";
        //			m_EnergyUI.text		= "0/0";
        //			m_AtkUI.text		= "";
        //			m_DefUI.text		= "";
        //			m_LifeProgressUI.sliderValue = 1;
        //			m_StaminaProgressUI.sliderValue = 1;
        //			m_OxygenProgressUI.sliderValue = 1;
        //			return;
        //		}
        //
        //
        //		AiNpcObject npc = m_RefNpc.m_Npc;
        //		m_NameUI.text		= npc.NpcName.ToString();
        //		m_LifeUI.text		= npc.life.ToString() + "/" + npc.maxLife.ToString();
        //		m_LifeProgressUI.sliderValue = npc.maxLife == 0? 0: npc.life / npc.maxLife;
        //		m_StaminaUI.text    = ((int)m_RefNpc.Stamina).ToString() + "/" + ((int)m_RefNpc.MaxStamina).ToString();
        //		m_StaminaProgressUI.sliderValue = npc.maxLife == 0? 0 : m_RefNpc.Stamina / m_RefNpc.MaxStamina;
        //		m_ShieldUI.text		= "0/0";
        //		m_EnergyUI.text     = "0/0";
        //		m_AtkUI.text		= npc.damage.ToString();
        //		m_DefUI.text		= npc.defence.ToString();
        //
        //
        //		m_OxygenUI.text = npc.oxygen.ToString() + "/" + npc.maxOxygen.ToString();
        //		m_OxygenProgressUI.sliderValue = npc.maxOxygen == 0 ? 0 : npc.oxygen / npc.maxOxygen;


        if (m_RefNpc == null || m_RefNpc.NPC == null)
        {
            SetServantInfo("--", PeSex.Male, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        }
        // playerInfo
        else
        {
            SetServantInfo(m_RefNpc.FullName, m_RefNpc.Sex, (int)m_RefNpc.GetAttribute(AttribType.Hp), (int)m_RefNpc.GetAttribute(AttribType.HpMax), (int)m_RefNpc.Stamina, (int)m_RefNpc.MaxStamina, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (int)m_RefNpc.GetAttribute(AttribType.CutDamage), (int)m_RefNpc.GetAttribute(AttribType.Def));
        }
    }