Ejemplo n.º 1
0
        private void ThrowDagger()
        {
            SoundManager.PlaySound(DataHandler.Sounds[SoundType.Throw], SoundCategory.SFX);
            float dist      = 20;
            var   daggerpos = Position + new Vector3((float)Math.Sin(Rotation.Y), 0, (float)Math.Cos(Rotation.Y)) * dist;
            var   dir       = (daggerpos - Position);

            dir.Normalize();
            var dagger = new Dagger(daggerpos, dir);

            World.GetInstance().Add(dagger);
            dgthrown = true;
        }
Ejemplo n.º 2
0
 private void ThrowDagger()
 {
     SoundManager.PlaySound(DataHandler.Sounds[SoundType.Throw], SoundCategory.SFX);
     float dist = 20;
     var daggerpos = Position + new Vector3((float)Math.Sin(Rotation.Y), 0, (float)Math.Cos(Rotation.Y)) * dist;
     var dir = (daggerpos - Position);
     dir.Normalize();
     var dagger = new Dagger(daggerpos, dir);
     World.GetInstance().Add(dagger);
     dgthrown = true;
 }