コード例 #1
0
        protected override void LoadContent()
        {
            base.LoadContent();
            var scene = new Scene();

            var audioPlayer = new AudioPlayer();

            scene.AddChild(audioPlayer);
            audioPlayer.Volume                = 0.5f;
            audioPlayer.AudioClip             = new AudioClip();
            audioPlayer.AudioClip.ContentPath = "laser";
            audioPlayer.AddChild(new VolumeController());

            scene.SaveToFile(@"TestGame - CurrentLevel.json", new Serializer());
            this.CurrentScene = new Serializer().Deserialize <Scene>(@"TestGame - CurrentLevel.json");
        }