Beispiel #1
0
 public void WriteXml(System.Xml.XmlWriter writer)
 {
     writer.WriteAttributeString("CurHp", CurHP.ToString());
     writer.WriteAttributeString("MaxHp", HP.ToString());
     writer.WriteAttributeString("Sword", Sword.ToString());
     writer.WriteAttributeString("Item", CurItem.ToString());
     writer.WriteAttributeString("Face", curFacing.ToString());
     writer.WriteAttributeString("Location", location.X.ToString() + "," + location.Y.ToString());
 }
Beispiel #2
0
    public void ResetData()
    {
        IsReady      = false;
        IsAbleAttack = false;
        IsAttacking  = false;
        SummonPhase  = 0;

        CurHP = Health = (Health + Health * 0.05f * GameManager.Inst().StgManager.BossDeathCounts[GameManager.Inst().StgManager.Stage - 1]);

        GameManager.Inst().UiManager.MainUI.BossHPBar.fillAmount = CurHP / Health;
        GameManager.Inst().UiManager.MainUI.BossHPBarText.text = CurHP.ToString() + "/" + Health.ToString();
    }
Beispiel #3
0
        /// <summary>
        /// 获取属性值
        /// </summary>
        public bool GetAttrStruct(ref AttrStruct attr, eSkillAttrIndex idx)
        {
            if (idx <= eSkillAttrIndex.None || idx >= eSkillAttrIndex.MAX)
            {
                return(false);
            }

            attr.attrIdx = (byte)idx;
            switch (idx)
            {
            case eSkillAttrIndex.Level:
                attr.attrValue = mRoleLevel.ToString();
                break;

            case eSkillAttrIndex.HP:
                attr.attrValue = CurHP.ToString();
                break;

            case eSkillAttrIndex.MaxHP:
            case eSkillAttrIndex.MaxHPRate:
                attr.attrValue = FinalRoleValue.MaxHP.ToString();
                break;

            case eSkillAttrIndex.MP:
                attr.attrValue = CurMP.ToString();
                break;

            case eSkillAttrIndex.MaxMP:
                attr.attrValue = FinalRoleValue.MaxMP.ToString();
                break;

            case eSkillAttrIndex.MoveSpeed:
                attr.attrValue = FinalRoleValue.Speed.ToString();
                break;

            default:
                return(false);
            }

            return(true);
        }