Beispiel #1
0
        public MenuComponent(SpriteFont font, string[] menuItems, ASummonersTaleGame gameReference) : this(font, gameReference)
        {
            selectedIndex = ASummonersTaleGame.SavedGamePresent ? 0 : 1;

            this.menuItems.AddRange(menuItems);

            MeasureMenu();
        }
Beispiel #2
0
        public MenuComponent(SpriteFont font, ASummonersTaleGame gameReference)
        {
            mouseOver = false;

            this.font       = font;
            activeTexture   = gameReference.Content.Load <Texture2D>(@"Images\Miscellaneous\menu_button_activated");
            normalTexture   = gameReference.Content.Load <Texture2D>(@"Images\Miscellaneous\menu_button_normal");
            inactiveTexture = gameReference.Content.Load <Texture2D>(@"Images\Miscellaneous\menu_button_inactive");

            buttonIndexChanged = gameReference.Content.Load <SoundEffect>(@"Sounds\button_sound");
            buttonIndexChangedEffectInstance = buttonIndexChanged.CreateInstance();
        }
        public CloudComponent(int layers, Texture2D texture, ASummonersTaleGame game, params int[] layerSpeeds)
        {
            Cloud.Texture = texture;

            this.layers = new List <CloudLayer>();

            maxHeight = ASummonersTaleGame.ScreenRectangle.X + (ASummonersTaleGame.ScreenRectangle.Height / 6);
            minHeight = 0;

            screenWidth = game.GraphicsDevice.Adapter.CurrentDisplayMode.Width;

            for (int i = 0, layerDepth = 1; i < layers; i++, layerDepth++)
            {
                this.layers.Add(new CloudLayer(layerDepth, layerSpeeds[i]));
            }
        }
Beispiel #4
0
 public WorldMapState(ASummonersTaleGame game) : base(game)
 {
     Game.Services.AddService(typeof(IWorldMapState), this);
 }
 public GameState(Game game) : base(game)
 {
     GameReference = game as ASummonersTaleGame;
 }