AcademyPopcorn.ShootingRacket.ProduceObjects C# (CSharp) Метод

ProduceObjects() публичный Метод

public ProduceObjects ( ) : System.Collections.Generic.IEnumerable
Результат 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

Пример #1
0
 public void ShootPlayerRacket(ShootingRacket racket)
 {
     racket.ProduceObjects();
 }