Exemplo n.º 1
0
        public GameWorld(Game game, ContentManager cm, Camera cam)
            : base(game)
        {
            content = cm;
            camera = cam;
            components = game.Components;
            physworld = new PhysicsWorld(game);
            modelmgr = new ModelManager(game, cam);
            level = new Level();

            components.Add(physworld);
            components.Add(modelmgr);

            sfx = game.Content.Load<SoundEffect>(@"Audio/punch");
            punch = sfx.CreateInstance();
            punch.IsLooped = false;
            sfx = game.Content.Load<SoundEffect>(@"Audio/bgm");
            bgm = sfx.CreateInstance();
            bgm.IsLooped = true;
            bgm.Play();
        }