void Start() { rb = GetComponent <Rigidbody2D>(); coll = GetComponent <CircleCollider2D>(); sr = GetComponent <SpriteRenderer>(); State = bstate.bsMoving; sr.color = new Color(Random.Range(0, 1.0f), Random.Range(0, 1.0f), Random.Range(0, 1.0f)); }
public void PopTheBall(bool GiveScore) { if (GiveScore) { PlayerController.ChangeScore(Score); } State = bstate.bsDying; coll.enabled = false; Invoke("Kill", 0.2f); }