private BubbleController selectOneBubble(EnumsGame.BubbleCollors cor) { foreach (BubbleController b in bubblesOnGame) { if (!b._used && b.collor.Equals(cor)) { return(b); } } return(null); }
public int quantBubblesType(EnumsGame.BubbleCollors collor) { int retorno = 0; foreach (BubbleController bc in bubblesOnGame) { if (bc.collor.Equals(collor)) { retorno++; } } return(retorno); }
public void useSkill(EnumsGame.BubbleCollors collor, Vector3 pos, float size) { if (collor.Equals(EnumsGame.BubbleCollors.RED)) { initSkill(EnumsGame.GameSkills.FIRE_BASIC, pos, size); } else if (collor.Equals(EnumsGame.BubbleCollors.YELLOW)) { initSkill(EnumsGame.GameSkills.ELETRIC_BASIC, pos, size); } else if (collor.Equals(EnumsGame.BubbleCollors.BLUE)) { initSkill(EnumsGame.GameSkills.WATER_BASIC, pos, size); } }
public void initMe(EnumsGame.BubbleCollors cor, Vector3 pos) { collor = cor; transform.position = pos; currentColor = Color.red; if (cor.Equals(EnumsGame.BubbleCollors.YELLOW)) { currentColor = Color.yellow; } else if (cor.Equals(EnumsGame.BubbleCollors.BLUE)) { currentColor = Color.blue; } GetComponent <SpriteRenderer>().color = currentColor; transform.Find("b_ring").GetComponent <SpriteRenderer>().color = currentColor; transform.Find("b_bright").GetComponent <SpriteRenderer>().color = currentColor; attacking = false; used = false; moviments.initMe(); }