Beispiel #1
0
 public Track(MusicEngine engine, string name, Song song, float loopTime = 0)
 {
     this.Engine = engine;
     this.Name   = name;
     this.Song   = song;
     if (0 < loopTime)
     {
         this.LoopTime = new TimeSpan((int)(loopTime * 1e-7));
     }
 }
Beispiel #2
0
        public Game1()
        {
            RNG             = new Random();
            DeviceManager   = new GraphicsDeviceManager(this);
            TextureCache    = new TextureCache(this);
            SpriteEngine    = new SpriteEngine(this);
            TilemapEngine   = new TilemapEngine(this);
            TriangleEngine  = new TriangleEngine(this);
            SoundEngine     = new SoundEngine(this);
            MusicEngine     = new MusicEngine(this);
            TextEngine      = new TextEngine(this);
            ParallaxEngine  = new ParallaxEngine(this);
            ParticleEmitter = new ParticleEmitter(this);
            Controller      = new Controller();
            DeviceManager.GraphicsProfile = GraphicsProfile.HiDef;
            Content = new ContentManager(Services);
            Content.RootDirectory = "Content";

            IsFixedTimeStep  = true;
            RealActiveWindow = new LoadScreen(this);
        }