public void addProtect(ProtectController pc) { if (l_protect.Count < maxProtect) { pc.initMe(transform.GetChild(l_protect.Count)); l_protect.Add(pc); quantProtect++; } }
private IEnumerator AttackLoop() { var wait = new WaitForSeconds(Status.AttackInterval); while (Status.Hp > 0) { yield return(wait); ProtectController.Damage(Status.Attack); } }
public void removeProtect() { if (l_protect.Count > 0) { ProtectController pc_remove = l_protect[0]; l_protect.Remove(pc_remove); pc_remove.removeMe(); pc_remove.transform.parent = pc_remove.transform.parent.parent; pc_remove.GetComponent <SpriteRenderer>().sortingOrder = 200; quantProtect--; //Ajustar posições trazendo os protects pra o inicio do circulo. for (int i = 0; i < l_protect.Count; i++) { l_protect[i].initMe(transform.GetChild(i)); } } }
public void addProtect(ProtectController pc) { p_protect.addProtect(pc); }