示例#1
0
        private void CreateBall(int x, int y)
        {
            Transform BallTransform;
            AddBall   addBall = Instantiate(addBallPrefab);

            addBall.OnCollision += AddBallCollision;
            BallTransform        = addBall.transform;

            BallTransform.SetParent(gridContainer);
            BallTransform.localPosition = GetPositionFromModel(x, y);
            BallTransform.localScale   *= stepX;
            shapes.Add(BallTransform);
        }
示例#2
0
 private void AddBallCollision(AddBall collision)
 {
     shapes.Remove(collision.transform);
     ballsToAdd++;
 }