示例#1
0
        public void FireBullet(Player PlayerThatShoots, SoundBank TheSoundBank)
        {
            Bullet2 newBullet = new Bullet2(Texture);

            newBullet.Velocity = new Vector2((float)Math.Cos(PlayerThatShoots.Rotation), (float)Math.Sin(PlayerThatShoots.Rotation)) * 100.0f;

            newBullet.Position = PlayerThatShoots.Position + newBullet.Velocity * 1.75f;
            newBullet.Rotation = PlayerThatShoots.Rotation;
            newBullet.Scale = 1.0f;
            newBullet.Create();
            TheSoundBank.PlayCue("MP5-1");
            bullets.Add(newBullet);

        }