コード例 #1
0
		public BulletDataConfig ()
		{
			IDManager idManager = IDManager.Instance;
			BulletDataDic = new Dictionary<int, BulletData>();
			BulletData data;

			data = new BulletData();
			data.Kid = idManager.GetID(IDType.Bullet, 1);
			data.Name = "FireBall";
			data.Res3D = "Bullet_1";
			data.Speed = 3f;
			data.Radius = 0.2f;
			BulletDataDic.Add(data.Kid, data);
		}
コード例 #2
0
        public void Parse(string name, out Dictionary<int, BulletData> kvDic)
        {
			LoadFile(name);
			
			kvDic = new Dictionary<int, BulletData>();

			while(!EndOfRow)
			{
				int col = 0;
				BulletData data = new BulletData();

				data.Kid = ReadInt(col++);
				data.Name = ReadString(col++);
				data.Res3D = ReadString(col++);
				data.Speed = ReadFloat(col++);
				data.Radius = ReadFloat(col++);

				kvDic.Add(data.Kid, data);
				NextLine();
			}
        }