/// <summary> /// Initializes a new instance of the <see cref="BulletEmiter" /> class. /// </summary> /// <param name="name">The name.</param> public BulletEmiter(string name) { this.entity = new Entity(name) .AddComponent(new Transform2D()); this.bullets = new Bullet[this.bulletMax]; this.bulletIndex = 0; for (int i = 0; i < bulletMax; i++) { Bullet bullet = new Bullet(); this.bullets[i] = bullet; this.entity.AddChild(bullet.Entity); } }
/// <summary> /// Initializes a new instance of the <see cref="BulletBehavior" /> class. /// </summary> /// <param name="bullet">The bullet.</param> public BulletBehavior(Bullet bullet) { this.bullet = bullet; }