public Tbl_Action_HitInfo(XmlNode _node) { try{ m_HitType = (eHitType)Enum.Parse(typeof(eHitType), _node.Attributes["HitType"].Value, true); m_HitMultiTargetCount = int.Parse(_node.Attributes["MultiTargetCount"].Value); m_HitTiming = float.Parse(_node.Attributes["Timing"].Value); m_HitProjectileName = _node.Attributes["ProjectileFilePath"].Value; m_HitProjectileHitFileName = _node.Attributes["ProjectileHitFilePath"].Value; m_HitProjectileSpeed = float.Parse(_node.Attributes["ProjectileSpeed"].Value); m_HitProjectileAccel = float.Parse(_node.Attributes["ProjectileAcceleration"].Value); m_HitProjectilePath = (eProjectilePath)Enum.Parse(typeof(eProjectilePath), _node.Attributes["ProjectilePath"].Value, true); m_HitValuePercent = float.Parse(_node.Attributes["ValuePercent"].Value); m_HitValueLookType = (eValueLookType)Enum.Parse(typeof(eValueLookType), _node.Attributes["ValueLookType"].Value, true); m_HitValueLookDuration = float.Parse(_node.Attributes["ValueLookDuration"].Value); m_HitValueLookCount = int.Parse(_node.Attributes["ValueLookCount"].Value); m_HitProjectileHitSoundPath = _node.Attributes["ProjectileHitSoundPath"].Value; XmlNode nodeArea = _node.NextSibling; while(true) { if(nodeArea == null) break; Tbl_Action_AreaInfo areaInfo = new Tbl_Action_AreaInfo(nodeArea); m_AreaInfo.Add(areaInfo); nodeArea = nodeArea.NextSibling; } } catch(Exception e){ Debug.LogError(e); } }
public Tbl_Action_HitInfo_(XmlNode _node) { try{ m_HitType = (eHitType)Enum.Parse(typeof(eHitType), _node.Attributes["HitType"].Value, true); m_HitTiming = float.Parse(_node.Attributes["Timing"].Value); m_HitProjectileName = _node.Attributes["ProjectileFilePath"].Value; m_HitProjectileHitFileName = _node.Attributes["ProjectileHitFilePath"].Value; m_HitProjectileSpeed = float.Parse(_node.Attributes["ProjectileSpeed"].Value); m_HitProjectileAccel = float.Parse(_node.Attributes["ProjectileAcceleration"].Value); m_HitProjectilePath = (eProjectilePath)Enum.Parse(typeof(eProjectilePath), _node.Attributes["ProjectilePath"].Value, true); m_HitAreaShape = (eHitAreaShape)Enum.Parse(typeof(eHitAreaShape), _node.Attributes["AreaShape"].Value, true); m_HitAngle = float.Parse(_node.Attributes["Angle"].Value); m_HitCenterDirectionAngle = float.Parse(_node.Attributes["CenterDirectionAngle"].Value); m_HitMinDistance = float.Parse(_node.Attributes["MinDistance"].Value); m_HitMaxDistance = float.Parse(_node.Attributes["MaxDistance"].Value); m_HitWidth = float.Parse(_node.Attributes["Width"].Value); m_HitHeight = float.Parse(_node.Attributes["Height"].Value); m_HitOffsetX = float.Parse(_node.Attributes["OffsetX"].Value); m_HitOffsetY = float.Parse(_node.Attributes["OffsetY"].Value); m_HitValuePercent = float.Parse(_node.Attributes["ValuePercent"].Value); m_HitValueLookType = (eValueLookType)Enum.Parse(typeof(eValueLookType), _node.Attributes["ValueLookType"].Value, true); m_HitValueLookDuration = float.Parse(_node.Attributes["ValueLookDuration"].Value); m_HitValueLookCount = int.Parse(_node.Attributes["ValueLookCount"].Value); m_HitProjectileHitSoundPath = _node.Attributes["ProjectileHitSoundPath"].Value; } catch(Exception e){ Debug.LogError(e); } }