コード例 #1
0
ファイル: ADAMenu.cs プロジェクト: sctjkc01/Clocked
        public void LoadRes(Microsoft.Xna.Framework.Content.ContentManager cm)
        {
            currencyBack = new StaticSprite(cm.Load<Texture2D>("Menu/Top Menu/Top Menu Currency Block"));

            invBack = new StaticSprite(cm.Load<Texture2D>("Menu/Top Menu/Inventory Menu"));
            invMiniBack = new StaticSprite(cm.Load<Texture2D>("Menu/Top Menu/Inventory Mini Menu"));
            invMiniBlock = new StaticSprite(cm.Load<Texture2D>("Menu/Top Menu/Mini Item Block"));

            /*
            itemBack = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Items"), new Point(0, 0), new Rectangle(0, 0, 119, 86));
            itemDescBack = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Items"), new Point(0, 0), new Rectangle(167, 5, 370, 80));

            skillBack = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Arms, Magick"), new Point(0, 0), new Rectangle(0, 0, 370, 79));
            skillDescBack = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Arms, Magick"), new Point(0, 0), new Rectangle(395, 0, 372, 79));
             */

            Point origin = new Point(22, 3);
            foreach(Pair<Button, string> alpha in new Pair<Button, string>[] { new Pair<Button, string>(item, "Items"), new Pair<Button, string>(journal, "Journal"), new Pair<Button, string>(stat, "Stats"), new Pair<Button, string>(skill, "Skills"), new Pair<Button, string>(quit, "Quit") }) {
                Texture2D tex = cm.Load<Texture2D>("Menu/Top Menu/Top Menu - " + alpha.Item2);

                alpha.Item1.Hover = new StaticSprite(tex, origin);
                alpha.Item1.Idle = new StaticSprite(tex, origin);
                alpha.Item1.Idle.Tint = new Color(200, 200, 200);
                alpha.Item1.Press = new StaticSprite(tex, origin);
                alpha.Item1.Press.Tint = new Color(175, 175, 175);
            }

            Texture2D tabfb = cm.Load<Texture2D>("Menu/Top Menu/TabFwd-Back");
            pktButtons[0].Hover = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(108, 0, 13, 19));
            pktButtons[0].Idle = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(108, 0, 13, 19));
            pktButtons[0].Idle.Tint = new Color(200, 200, 200);
            pktButtons[0].Press = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(108, 0, 13, 19));
            pktButtons[0].Press.Tint = new Color(175, 175, 175);
            Texture2D tab = cm.Load<Texture2D>("Menu/Top Menu/Tab");
            for(int i = 1; i < 5; i++) {
                pktButtons[i].Hover = new StaticSprite(tab);
                pktButtons[i].Idle = new StaticSprite(tab);
                pktButtons[i].Idle.Tint = new Color(200, 200, 200);
                pktButtons[i].Press = new StaticSprite(tab);
                pktButtons[i].Press.Tint = new Color(175, 175, 175);
            }
            pktButtons[5].Hover = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(0, 0, 13, 19));
            pktButtons[5].Idle = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(0, 0, 13, 19));
            pktButtons[5].Idle.Tint = new Color(200, 200, 200);
            pktButtons[5].Press = new StaticSprite(tabfb, new Point(0, 0), new Rectangle(0, 0, 13, 19));
            pktButtons[5].Press.Tint = new Color(175, 175, 175);

            Texture2D block = cm.Load<Texture2D>("Menu/Top Menu/Item Block");
            for(int i = 0; i < 20; i++) {
                itemButtons[i].Btn.Hover = new StaticSprite(block);
                itemButtons[i].Btn.Idle = new StaticSprite(block);
                itemButtons[i].Btn.Idle.Tint = new Color(200, 200, 200);
                itemButtons[i].Btn.Press = new StaticSprite(block);
                itemButtons[i].Btn.Press.Tint = new Color(175, 175, 175);
            }
        }
コード例 #2
0
ファイル: AnimateSprite.cs プロジェクト: sctjkc01/Clocked
 public void Add(StaticSprite sprite)
 {
     states.Add(sprite);
 }
コード例 #3
0
 public void Add(StaticSprite sprite)
 {
     states.Add(sprite);
 }
コード例 #4
0
ファイル: BattleMenu.cs プロジェクト: sctjkc01/Clocked
        public void LoadRes(Microsoft.Xna.Framework.Content.ContentManager cm)
        {
            menubg = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Core"));
            skill = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Arms, Magick"));
            item = new StaticSprite(cm.Load<Texture2D>("Menu/Battle Menu/Battle HUD - Items"));

            int i = 1;
            foreach(Button alpha in new Button[] { punch, jump, arms, magick, items, run }) {
                Texture2D tex = cm.Load<Texture2D>("Menu/Battle Menu/Battle buttons " + i);

                alpha.Hover = new StaticSprite(tex);
                alpha.Idle = new StaticSprite(tex);
                alpha.Idle.Tint = new Color(240, 240, 240);
                alpha.Press = new StaticSprite(tex);
                alpha.Press.Tint = new Color(205, 205, 205);

                i++;
            }
        }
コード例 #5
0
ファイル: Room.cs プロジェクト: sctjkc01/Clocked
 public override void LoadRes(Microsoft.Xna.Framework.Content.ContentManager cm)
 {
     // Define the resource used as background
     background = new StaticSprite(cm.Load<Texture2D>("test/floor"));
     // Defines the Tex2D that is used to check for walls
     wallDef = cm.Load<Texture2D>("test/Test Room Red");
 }