Exemplo n.º 1
0
 public virtual void LoadContent(ContentManager Content, InputManager inputManager)
 {
     content = new ContentManager(Content.ServiceProvider, "Content");
     attributes = new List<List<string>>();
     contents = new List<List<string>>();
     this.inputManager = inputManager;
     audioManager = new AudioManager();
 }
Exemplo n.º 2
0
        public override void LoadContent(ContentManager content, InputManager inputManager)
        {
            images = new List<Texture2D>();
            base.LoadContent(content, inputManager);

            menu = new MenuManager();
            menu.LoadContent(content, "Option");

            audio = new AudioManager();
            audio.LoadContent(content, "Option");
            audio.MusicVolume = 1.0f;

            audio.FadeSong(1.0f, new TimeSpan(0, 0, 0, 1));
        }
Exemplo n.º 3
0
        public override void LoadContent(ContentManager content, InputManager inputManager)
        {
            images = new List<Texture2D>();
            base.LoadContent(content, inputManager);
            font = this.content.Load<SpriteFont>("TitleScreen/Coolvetica Rg");

            gui = new GUIManager();
            gui.LoadContent(content, "CharacterSelect");

            menu = new MenuManager();
            menu.LoadContent(content, "CharacterSelect");

            audio = new AudioManager();
            audio.LoadContent(content, "CharacterSelect");

            audio.PlaySong(0, true);
            //audio.FadeSong(0.0f, new TimeSpan(0, 0, 5));
        }
Exemplo n.º 4
0
        public override void LoadContent(ContentManager Content, InputManager inputManager)
        {
            base.LoadContent(Content, inputManager);
            font = this.content.Load<SpriteFont>("CreditsScreen/Coolvetica Rg");

            gui = new GUIManager();
            gui.LoadContent(Content, "Credits");

            audio = new AudioManager();
            audio.LoadContent(Content, "Credits");

            dul = false;

            fileManager = new FileManager();
            fileManager.LoadContent("Load/Credits.txt");

            for (int i = 0; i < fileManager.Attributes.Count; i++)
            {
                for (int j = 0; j < fileManager.Attributes[i].Count; j++)
                {
                    switch (fileManager.Attributes[i][j])
                    {
                        case "Videos" :
                            video = this.content.Load<Video>(fileManager.Contents[i][j]);
                            videoPlayer = new VideoPlayer();
                            videoPlayer.Play(video);
                            videoPlayer.IsLooped = true;
                            videoPlayer.Pause();
                            break;
                    }
                }
            }

            audio.PlaySong(0, true);
            audio.FadeSong(1.0f, new TimeSpan(0, 0, 0, 1));
        }
Exemplo n.º 5
0
        public override void LoadContent(ContentManager Content, InputManager inputManager)
        {
            base.LoadContent(Content, inputManager);
            splashItems = new List<string>();
            splashImages = new List<Texture2D>();

            Animation = new List<Animation>();
            fAnimation = new FadeAnimation();
            fAnimation.DefaultAlpha = 0.001f;

            ssAnimation = new SpriteSheetAnimation();
            animationTypes = new List<string>();

            alpha = new List<float>();
            itemNumber = 0;
            position = Vector2.Zero;
            align = "Center";

            fileManager = new FileManager();
            fileManager.LoadContent("Load/Splash.txt");

            audio = new AudioManager();
            audio.LoadContent(content, "Splash");
            audio.PlaySong(0);
            audio.MusicVolume = 0.0f;
            audio.FadeSong(1.0f, new TimeSpan(0,0,1));

            for (int i = 0; i < fileManager.Attributes.Count; i++)
            {
                for (int j = 0; j < fileManager.Attributes[i].Count; j++)
                {
                    switch (fileManager.Attributes[i][j])
                    {
                        case "Font":
                            font = this.content.Load<SpriteFont>(fileManager.Contents[i][j]);
                            break;
                        case "Item":
                            splashItems.Add(fileManager.Contents[i][j]);
                            break;
                        case "Image":
                            splashImages.Add(content.Load<Texture2D>(fileManager.Contents[i][j]));
                            break;
                        case "Axis":
                            axis = int.Parse(fileManager.Contents[i][j]);
                            break;
                        case "Position":
                            string[] temp = fileManager.Contents[i][j].Split(' ');
                            position = new Vector2(float.Parse(temp[0]),
                                float.Parse(temp[1]));
                            break;
                        case "Animation":
                            animationTypes.Add(fileManager.Contents[i][j]);
                            break;
                        case "Alpha":
                            alpha.Add(float.Parse(fileManager.Contents[i][j]));
                            break;
                        case "FadeSpeed":
                            fadeSpeed = float.Parse(fileManager.Contents[i][j]);
                            break;
                        case "Align":
                            align = fileManager.Contents[i][j];
                            break;
                    }
                }
            }
            SetSplashItems();
            SetAnimations();
        }
Exemplo n.º 6
0
        /*
        Random random = new Random();

        TimeSpan previousEnemySoundTime, enemySoundTime;
         */
        public override void LoadContent(ContentManager content, InputManager input)
        {
            //make 1x1 pixel dummy texture
            pixel = content.Load<Texture2D>("fade");
            //pixel.SetData(new[] { Color.White });

            camera = new Camera(ScreenManager.Instance.graphicsDevice);
            //viewport = new Viewport(0, 0, (int)ScreenManager.Instance.Dimensions.X, (int)ScreenManager.Instance.Dimensions.Y);

            playerIndex = 0;
            zoom = 1.0f;

            font = content.Load<SpriteFont>("Coolvetica Rg 12");
            base.LoadContent(content, input);

            audio = new AudioManager();
            audio.LoadContent(content, "Map1");
            audio.MusicVolume = 0.5f;
            //audio.PlaySong(0, true);

            map = new Map();
            map.LoadContent(content, map, "Map1");

            player = new EntityManager();
            player.LoadContent("Player", content, "Load/Player.txt", "", input);
            //player.SetPlayer(playerIndex);

            enemies = new EntityManager();
            enemies.LoadContent("Enemy", content, "Load/Enemy.txt", "Level1", input);

            guiManager = new GUIManager();
            guiManager.LoadContent(content, "Map1");

            highlight = content.Load<Texture2D>("highlight");

            soundEngine = new SoundEngine();
            soundEngine.LoadContent(content);
        }