Jump to content
  • Advertisement

mcaccountman

Member
  • Content Count

    9
  • Joined

  • Last visited

Posts posted by mcaccountman


  1. Hello, Im trying to find an easier way for making a decent amount of things visible / not visible. Preferrably an array that contains the names of said things but im not sure. This is what the redundant code is -- 

     

     button1.Visible = false;
                        button2.Visible = false;
                        button3.Visible = false;
                        button4.Visible = false;
                        pictureBox1.Visible = false;
                        pictureBox2.Visible = false;
                        pictureBox3.Visible = false;
                        pictureBox4.Visible = false;
     
    -- just trying to find a more efficient way than to copy and paste it over and over again and change the name. thanks!

  2. Please be more descriptive. Im trying to make it so there is 44 tiles (i did the math) each 50 by 50 pixels. I want them all named from 1 to 44 using possibly a  loop. Im not sure how loops (or any commands beside manually naming it like (new Rectange recty;)) can be used to name things but if you can find that out it will be extremely helpful.


  3. Guys, All i need is a algorithm to make 50, 50 width and height rectangles that fit into a 1000 , 1000 pixel form. i want to name the tiles so that in different locations it could set a boolean for the tile to be unable to pass or not. It is a 2d game. No xna or Unity. all i want is to make multiple rectangles like new Rectangle blah (blah blah) exept without me having to do it a bunch of times.


  4. I don't really understand what you mean by the "C# framework" and you can't really put XNA and Unity in the same category. XNA is/was a framework while Unity is an entire ecosystem.

    If you want a useful answer you will have to tell us what you're aiming for.

    Im aiming for c# without the game extensions like XNA or Unity. Just plain c# and graphics, such as  

     

    e.Graphics.DrawRectangle(new Pen(Color.Black), daleTalkRadius);

                    daleTalkRadius.Location = new Point(dalex - 100, daley - 70);
                    e.Graphics.FillRectangle(new SolidBrush(Color.PeachPuff), entityDale);
                    e.Graphics.FillRectangle(new SolidBrush(Color.PeachPuff), entityThief);
                    entityDale.Location = new Point(dalex, daley);
                    entityThief.Location = new Point(thiefwalkx, thiefwalky);
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!