private void TurnLight(bool on) { if (!on) { if (!this.GetComponent <Light>()) { return; } } if (on) { if (this.GetComponent <Light>()) { return; } } if (on) { BallManager.AddBallLight(this); } else { Destroy(this.GetComponent <Light>()); } }
private void TurnLight(bool on) { if (!on) { if (!this.GetComponent <Light>()) { return; } } if (on) { if (this.GetComponent <Light>()) { return; } } if (on) { BallManager.AddBallLight(this); } else { Destroy(this.GetComponent <Light>()); } }