Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » DirectX » Games » Downloads
 
Add your own
alternative version

Game Engine

, 20 Nov 2009 CPL
A game engine first prototype
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MTV3D65;
using IrrKlang; 


namespace gefx
{
   public  class Sounds
    {
       public ISoundEngine SoundsEngines;
       public ISound Music;


       public  Sounds()
       {
           SoundsEngines = new ISoundEngine();

       }

       public void Play2DSound(string SoundFileName)
       {

           Music = SoundsEngines.Play2D(SoundFileName,true );


       }

       public void Play3DSound(string file, TV_3DVECTOR pos)
       {
          Music = SoundsEngines.Play3D(file, pos.x, pos.y, pos.z,true );
          Vector3D v = new Vector3D(pos.x, pos.y, pos.z);
          

          Music.Position = v;

       }

       public void Stop2DSound()
       {

           SoundsEngines.StopAllSounds();

       }

       public void SetDistance(float Dist)
       {
           Music.MinDistance = Dist;



       }

       public void SetListenerPosition(TV_3DVECTOR Position, TV_3DVECTOR Direction)
       {
           Vector3D Vpos= new Vector3D(Position.x,Position.y,Position.z );
           Vector3D Vdir= new Vector3D(Direction.x,Direction.y,Direction.z );

           SoundsEngines.SetListenerPosition(Vpos, Vdir);
           



       }


    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Public License Version 1.0 (CPL)

Share

About the Author

Member 3873633
Software Developer
Croatia Croatia
Programer

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150123.1 | Last Updated 20 Nov 2009
Article Copyright 2009 by Member 3873633
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid