Commit db7a76b3 authored by 18김상언's avatar 18김상언

Enemy의 각종 수치들을 파싱하는 LoadEnemyData를 작성했다. 근데 데이터를 float[]배열안에 그냥 파싱했는데 솔직히 나중에...

Enemy의 각종 수치들을 파싱하는 LoadEnemyData를 작성했다. 근데 데이터를 float[]배열안에 그냥 파싱했는데 솔직히 나중에 찾아 쓰는데 힘들거 같다. 수정방법을 생각해야겠다
parent 92356b8c
...@@ -95,6 +95,19 @@ public class EnemyManager : Singleton<EnemyManager> ...@@ -95,6 +95,19 @@ public class EnemyManager : Singleton<EnemyManager>
while ((tableLine = strReader.ReadLine()) != null) while ((tableLine = strReader.ReadLine()) != null)
{ {
cellValue = tableLine.Split(','); cellValue = tableLine.Split(',');
int enemyID = -1;
float[] enemyData = { 0.0f };
//enemyData 배열에 있는 값 순서대로 에너미의 health, weight, height, width, detectRange, atkRange, atkDistance, atkDelay, pjtSpeed, moveSpeed, damage
//atk = attack, pjt = projectile(투사체)
int.TryParse(cellValue[0], out enemyID);
for(int i=0;i<11;i++)
{
float.TryParse(cellValue[i + 1], out enemyData[i]);
}
enemyDataByID.Add(enemyID, enemyData);
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment