コード例 #1
0
ファイル: MyStats.cs プロジェクト: Deus0/Zeltex
	public void SetDefaults() {
		if (StatsList.Count == 0) 
		{
			StatsList = new List<BaseStat> ();
			BaseStat NewHealthStat = new BaseStat ();
			NewHealthStat.Name = "Health";
			NewHealthStat.SetDefaults ();
			//NewHealthStat.Regeneration = BaseRegen;
			StatsList.Add (NewHealthStat);
		
			BaseStat NewManaStat = new BaseStat ();
			NewManaStat.Name = "Mana";
			NewManaStat.SetDefaults ();
			//NewManaStat.Regeneration = BaseRegen;
			StatsList.Add (NewManaStat);
		
			BaseStat NewEnergy = new BaseStat ();
			NewEnergy.Name = "Energy";
			NewEnergy.SetDefaults ();
			//NewEnergy.Regeneration = BaseRegen;
			StatsList.Add (NewEnergy);
		
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Strength";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Vitality";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Intelligence";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Wisdom";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Agility";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Dexterity";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Luck";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			{
				Attribute NewAttribute = new Attribute ();
				NewAttribute.Name = "Charisma";
				NewAttribute.SetDefaults ();
				AttributeList.Add (NewAttribute);
			}
			UpdateAllBaseStats ();
		}
	}