AcademyPopcorn.ShootingRacket.ProduceObjects C# (CSharp) Method

ProduceObjects() public method

public ProduceObjects ( ) : System.Collections.Generic.IEnumerable
return System.Collections.Generic.IEnumerable
        public override System.Collections.Generic.IEnumerable<GameObject> ProduceObjects()
        {
            List<GameObject> bullets = new List<GameObject>();
            if (isShooting)
            {
                isShooting = false;
                bullets.Add(new Bullet(new MatrixCoords(this.topLeft.Row, this.topLeft.Col + 5)));
            }
            return bullets;
        }
    }

Usage Example

Exemplo n.º 1
0
 public void ShootPlayerRacket(ShootingRacket racket)
 {
     racket.ProduceObjects();
 }