Beispiel #1
0
        public bool upgradeButtonEvent2(GameObjects.Movable.Wataha wataha)
        {
            if (recUpgradeButton2.Intersects(InputSystem.Cursor))
            {
                currentUpgradeButton2 = elements[17];

                if (InputSystem.mouseState.LeftButton == ButtonState.Pressed && InputSystem.mouseStateOld.LeftButton == ButtonState.Released)
                {
                    if (wolfName == "Kimiko")
                    {
                        if (!(Resources.Meat - skills[wolfLevel + 1].costM < 0 || Resources.Goldfangs - skills[wolfLevel + 1].costGF < 0 || Resources.Whitefangs - skills[wolfLevel + 1].costWF < 0))
                        {
                            wataha.wolves.Where(w => w.Name == "Kimiko").ToList()[0].strength   += skills[wolf3Level + 1].strength;
                            wataha.wolves.Where(w => w.Name == "Kimiko").ToList()[0].speed      += skills[wolf3Level + 1].speed;
                            wataha.wolves.Where(w => w.Name == "Kimiko").ToList()[0].resistance += skills[wolf3Level + 1].resistance;
                            Resources.Meat       -= skills[wolf3Level + 1].costM;
                            Resources.Whitefangs -= skills[wolf3Level + 1].costWF;
                            Resources.Goldfangs  -= skills[wolf3Level + 1].costGF;
                            wolf3Level           += 2;
                        }
                    }
                    else if (wolfName == "Yua")
                    {
                        if (!(Resources.Meat - skills[wolfLevel + 1].costM < 0 || Resources.Goldfangs - skills[wolfLevel + 1].costGF < 0 || Resources.Whitefangs - skills[wolfLevel + 1].costWF < 0))

                        {
                            wataha.wolves.Where(w => w.Name == "Yua").ToList()[0].strength   += skills[wolf2Level + 1].strength;
                            wataha.wolves.Where(w => w.Name == "Yua").ToList()[0].speed      += skills[wolf2Level + 1].speed;
                            wataha.wolves.Where(w => w.Name == "Yua").ToList()[0].resistance += skills[wolf2Level + 1].resistance;
                            Resources.Meat       -= skills[wolf2Level + 1].costM;
                            Resources.Whitefangs -= skills[wolf2Level + 1].costWF;
                            Resources.Goldfangs  -= skills[wolf2Level + 1].costGF;
                            wolf2Level           += 2;
                        }
                    }
                    else if (wolfName == "Hatsu")
                    {
                        if (!(Resources.Meat - skills[wolfLevel + 1].costM < 0 || Resources.Goldfangs - skills[wolfLevel + 1].costGF < 0 || Resources.Whitefangs - skills[wolfLevel + 1].costWF < 0))

                        {
                            wataha.wolves.Where(w => w.Name == "Hatsu").ToList()[0].strength   += skills[wolf1Level + 1].strength;
                            wataha.wolves.Where(w => w.Name == "Hatsu").ToList()[0].speed      += skills[wolf1Level + 1].speed;
                            wataha.wolves.Where(w => w.Name == "Hatsu").ToList()[0].resistance += skills[wolf1Level + 1].resistance;
                            Resources.Meat       -= skills[wolf1Level + 1].costM;
                            Resources.Whitefangs -= skills[wolf1Level + 1].costWF;
                            Resources.Goldfangs  -= skills[wolf1Level + 1].costGF;
                            wolf1Level           += 2;
                        }
                    }
                    return(true);
                }
                return(false);
            }
            currentUpgradeButton2 = elements[16];
            return(false);
        }
Beispiel #2
0
        public UpgradeQuest(int questId, string questTitle, string questDescription, int needStrenght, int needResistance, int needSpeed, int meatReward, int whiteFangReward, int goldFangReward, GameObject game,GameObjects.Movable.Wataha wataha) : base(questId, questTitle, questDescription, needStrenght, needResistance, needSpeed, meatReward, whiteFangReward, goldFangReward, game)
        {
            this.wataha = wataha;
            foreach(Wolf w in wataha.wolves)
            {
                sumOfSkills += w.speed + w.strength + w.resistance;
            }

            oldSumOfSkills = sumOfSkills;

        }
Beispiel #3
0
        public HUDController(SpriteBatch batch, GraphicsDevice device, ContentManager manager, Wataha.GameObjects.Movable.Wataha wataha, HuntingSystem hs)
        {
            this.huntingSystem = hs;
            this.wataha        = wataha;
            this.device        = device;
            this.spriteBatch   = batch;
            this.Content       = manager;

            pictures = new List <Texture2D>();

            ifQuestCompleted = false;

            font30        = Content.Load <SpriteFont>("Fonts/font1");
            arial18Italic = Content.Load <SpriteFont>("Fonts/arial/arial18");
            arial15Italic = Content.Load <SpriteFont>("Fonts/arial/arial15");
            arial20Italic = Content.Load <SpriteFont>("Fonts/arial/arial20");
            arial12Italic = Content.Load <SpriteFont>("Fonts/arial/arial12");
            broadwayFont  = Content.Load <SpriteFont>("Fonts/Broadway");

            pictures.Add(Content.Load <Texture2D>("Pictures/panel"));
            pictures.Add(Content.Load <Texture2D>("Pictures/meat"));
            pictures.Add(Content.Load <Texture2D>("Pictures/goldFangs"));
            pictures.Add(Content.Load <Texture2D>("Pictures/whiteFang"));
            pictures.Add(Content.Load <Texture2D>("Pictures/pauseScreen"));
            pictures.Add(Content.Load <Texture2D>("Pictures/resumeButton")); // 5
            pictures.Add(Content.Load <Texture2D>("Pictures/backToMainMenu"));
            pictures.Add(Content.Load <Texture2D>("Pictures/exitButton"));
            pictures.Add(Content.Load <Texture2D>("Pictures/rectangleForButtons")); //8
            pictures.Add(Content.Load <Texture2D>("Pictures/buttonPhoto"));
            pictures.Add(Content.Load <Texture2D>("Pictures/buttonPhoto2"));        //10
            pictures.Add(Content.Load <Texture2D>("Pictures/buttonPhoto3"));
            pictures.Add(Content.Load <Texture2D>("Pictures/actualQuestButton"));
            pictures.Add(Content.Load <Texture2D>("Pictures/saveGameButton"));
            pictures.Add(Content.Load <Texture2D>("Pictures/saveInfo"));         //14
            pictures.Add(Content.Load <Texture2D>("Pictures/saveInfoOk"));       //15
            pictures.Add(Content.Load <Texture2D>("Pictures/saveInfoOk2"));      //16
            pictures.Add(Content.Load <Texture2D>("Pictures/gameOver"));         //17
            pictures.Add(Content.Load <Texture2D>("Pictures/noMeat"));           //18
            pictures.Add(Content.Load <Texture2D>("Pictures/GoHuntingButton"));  //19
            pictures.Add(Content.Load <Texture2D>("Pictures/GoHuntingButton2")); //20
            pictures.Add(Content.Load <Texture2D>("Pictures/goHunt"));           //21

            actualSaveInfoOk       = pictures[15];
            actualGameOverInfoOk   = pictures[15];
            actualGoHuntingButton1 = pictures[19];
            actualGoHuntingButton2 = pictures[19];
            actualGoHuntingButton3 = pictures[19];

            wolfPanel = new WolfPanel(Content, arial20Italic, device.Viewport.Width, device.Viewport.Height);

            actualQuestPanel = new ActualQuestPanel(Content.Load <Texture2D>("Pictures/actualQuestPanel"), arial15Italic);
            QuestPanel       = new QuestPanel(Content, arial18Italic);
            marketPanel      = new MarketPanel(Content);

            screenWidth  = device.Viewport.Width;
            screenHeight = device.Viewport.Height;

            screenWidthOld     = 0;
            screenHeightOld    = 0;
            stringOffsetWidth  = 0;
            stringOffsetHeight = 0;

            huntingSystem.hudHunting = new HUDHunting(spriteBatch, device, Content);
        }