public void SelectedBall(PanleShopBall button) { if (currentSelectedButton != null) { currentSelectedButton.UnSelectThisBall(); } currentSelectedButton = button; }
public void Generate() { for (int i = 1; i <= count; i++) { GameObject ballCreated = Instantiate(prefabs, this.transform); PanleShopBall ball = ballCreated.GetComponent <PanleShopBall>(); ball.index = i; //ball.Generate(); ball.GenerateLocked(); ballButtonsObject.Add(ball); } }