コード例 #1
0
 public static void Draw(SpriteBatch spriteBatch, SpriteFont font)
 {
     dummy.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.Augusta));
     foreach (GUI_Element e in elements)
     {
         if (e.ElementTyp == Vars_Func.GUI_ElementTyp.BackgroundHUD)
         {
             //draw the button
             if (startButton.SpriteColor.A > 0)
             {
                 startButton.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
             }
             if (burnedLogo.SpriteColor.A > 0)
             {
                 burnedLogo.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.Augusta));
             }
             // draw the fire logo
             if (fireLogo.SpriteColor.A > 0)
             {
                 fireLogo.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.Augusta));
             }
         }
         e.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.Augusta));
     }
 }
コード例 #2
0
 public static void Draw(SpriteBatch spriteBatch, SpriteFont font)
 {
     if (!dontDraw && updateReady)
     {
         background.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
         headLine.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaText));
         foreach (GUI_Element b in buttons)
         {
             b.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaText));
         }
     }
 }
コード例 #3
0
 public static void Draw(SpriteBatch spriteBatch, SpriteFont font)
 {
     if (!dontDraw && updateReady)
     {
         background.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
         underLine.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaSmall));
         foreach (GUI_Element b in buttons)
         {
             b.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaText));
         }
         input.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2), new Vector2(1366 / 2 - 100, 450 - 96 / 2 - 20));
     }
 }
コード例 #4
0
        public void Draw(SpriteBatch spriteBatch, SpriteFont font)
        {
            if (visable)
            {
                if (topPole != null)
                {
                    topPole.Draw(spriteBatch, font);
                }
                if (bottomPole != null)
                {
                    bottomPole.Draw(spriteBatch, font);
                }

                if (leftChain != null)
                {
                    leftChain.Draw(spriteBatch, font);
                }
                if (rightChain != null)
                {
                    rightChain.Draw(spriteBatch, font);
                }
                foreach (GUI_Element c in childElements)
                {
                    c.Draw(spriteBatch, font);
                }
                if (elementTyp == Vars_Func.GUI_ElementTyp.BottomHUD)
                {
                    spriteBatch.Draw(Vars_Func.getGUI_ElementTextures(elementTyp), new Vector2(currentRectangle.X, currentRectangle.Y), Color.Red);
                    //else spriteBatch.Draw(Vars_Func.getGUI_ElementTextures(elementTyp), new Vector2(rectangle.X, rectangle.Y), spriteColor);
                }
                else
                {
                    spriteBatch.Draw(Vars_Func.getGUI_ElementTextures(elementTyp), currentRectangle, spriteColor);
                }

                spriteBatch.DrawString(font, text, new Vector2(currentRectangle.X + textXBonus, currentRectangle.Y + 2 + textYBonus), Color.Black);

                if (frameElement != null)
                {
                    frameElement.Draw(spriteBatch, font);
                }
            }
        }
コード例 #5
0
 public static void Draw(SpriteBatch spriteBatch, SpriteFont font)
 {
     if (!dontDraw && updateReady)
     {
         dummy.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
         foreach (GUI_Element e in elements)
         {
             e.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaTextField));
         }
         foreach (GUI_Element f in frames)
         {
             f.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaTextField));
         }
         returnButton.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaText));
         book.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaText));
         headLine.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaHeadline));
         backgroundFrame.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
     }
 }
コード例 #6
0
 public static void Draw(SpriteBatch spriteBatch, SpriteFont font)
 {
     if (!dontDraw && updateReady)
     {
         foreach (GUI_Element e in elements)
         {
             e.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaTextField));
         }
         background.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaBold2));
         foreach (GUI_Element f in frames)
         {
             f.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaTextField));
         }
         foreach (GUI_Element b in buttons)
         {
             b.Draw(spriteBatch, Vars_Func.getGUI_Font(Vars_Func.GUI_Font.AugustaTextField));
         }
     }
 }
コード例 #7
0
ファイル: Spells.cs プロジェクト: streber91/3D-Game-Project
        public static void castSpell(Logic.Vars_Func.SpellType typ, Vector2 position, Environment.Map map)
        {
            switch (typ)
            {
            case Vars_Func.SpellType.SummonImp:
                if (Player.enoughMana(summonImpCost))
                {
                    Player.Mana -= summonImpCost;
                    new Imp(map.getHexagonAt(map.HQPosition).Neighbors[3], map);
                }
                if (map.ImpList.Count >= 3)
                {
                    summonImpCost = map.ImpList.Count * 100;
                }
                break;

            case Vars_Func.SpellType.Fireball:
                if (Player.enoughMana(fireballCost))
                {
                    Player.Mana -= fireballCost;
                    map.getHexagonAt(position).Fireballs.Add(new Basic.FireBallModel(Vars_Func.getFireBall().Model, Vars_Func.getFireBall().Fires, map, position));

                    //// is the target a creature?
                    //if (map.getHexagonAt(position).Obj != null && (map.getHexagonAt(position).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.DungeonCreature ||
                    //        map.getHexagonAt(position).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.NeutralCreature || map.getHexagonAt(position).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.HeroCreature))
                    //{
                    //    //damage creature
                    //    Creature target = (Creature)map.getHexagonAt(position).Obj;
                    //    target.takeDamage(100);
                    //    //is creature dead?
                    //    if (target.DamageTaken >= target.HP) map.DyingCreatures.Add(target);
                    //}
                    ////// is the target an imp?
                    ////else if (map.getHexagonAt(position).Obj != null && map.getHexagonAt(position).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.Imp)
                    ////{
                    ////    //damage imp
                    ////    Imp target = (Imp)map.getHexagonAt(position).Obj;
                    ////    target.takeDamage(100);
                    ////    // is imp dead?
                    ////    if (target.DamageTaken >= target.HP) map.remove(target);
                    ////}

                    //// effects neighbors
                    //foreach (Vector2 hex in map.getHexagonAt(position).Neighbors)
                    //{
                    //    // is the target a creature?
                    //    if (map.getHexagonAt(hex).Obj != null && (map.getHexagonAt(hex).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.DungeonCreature ||
                    //        map.getHexagonAt(hex).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.NeutralCreature || map.getHexagonAt(hex).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.HeroCreature))
                    //    {
                    //        //damage creature
                    //        Creature target = (Creature)map.getHexagonAt(hex).Obj;
                    //        target.takeDamage(60);
                    //        //is creature dead?
                    //        if (target.DamageTaken >= target.HP) map.DyingCreatures.Add(target);
                    //    }
                    //    //// is the target an imp?
                    //    //else if (map.getHexagonAt(hex).Obj != null && map.getHexagonAt(hex).Obj.getThingTyp() == Logic.Vars_Func.ThingTyp.Imp)
                    //    //{
                    //    //    //damage imp
                    //    //    Imp target = (Imp)map.getHexagonAt(hex).Obj;
                    //    //    target.takeDamage(100);
                    //    //    // is imp dead?
                    //    //    if (target.DamageTaken >= target.HP) map.remove(target);
                    //    //}
                    //}
                }
                break;
            }
        }