private static void CreateAdds(JArray addData) { foreach (JObject add in addData) { CreateAdd(add); } if (!AddEnemy.ExistsID(0)) { new AddEnemy(); } }
public static Enemy GetEnemyByID(int id) { if (Boss.ExistsID(id)) { return(Boss.GetByID(id)); } if (AddEnemy.ExistsID(id)) { return(AddEnemy.GetByID(id)); } return(null); }
private static async Task CreateAddsAsync(JArray addData) { List <Task> addTaks = new List <Task>(); foreach (JObject add in addData) { addTaks.Add(Task.Run(() => CreateAdd(add))); } foreach (var task in addTaks) { await task; } if (!AddEnemy.ExistsID(0)) { new AddEnemy(); } }
private void Start() { add = GetComponent <AddEnemy>(); camAnim = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Animator>(); }
// Use this for initialization void Start() { addEnemy = GameObject.FindGameObjectWithTag("CardInventory").GetComponent <AddEnemy> (); sc = GameObject.FindGameObjectWithTag("StageDisplay").GetComponent <StageController>(); eHealth = sc.currentStage * 100; }