MyGame.BulletsManager.AddBullet C# (CSharp) Method

AddBullet() public method

Add a new bullet at the specified position, rotation and direction
public AddBullet ( Vector3 position, Vector3 rotation, Vector3 direction ) : void
position Vector3 initial position of the new bullet
rotation Vector3 rotation of the new bullet
direction Vector3 Direction in which the bullet will move
return void
        public void AddBullet(Vector3 position,Vector3 rotation, Vector3 direction)
        {
            Bullet bullet = new Bullet(myGame, Game.Content.Load<Model>("projectile"),
                new BulletUnit(myGame, position, rotation, Constants.BULLET_SCALE, direction));
            bullets.Add(bullet);
        }