MheQ's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 5 (0.02 per day)
- Joined:
- 14-September 12
- Profile Views:
- 159
- Last Active:
Nov 16 2012 08:06 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: XNA C#: How to use ScreenWidth in other classes?
Posted 26 Sep 2012
AdoTheLimey, on 26 September 2012 - 10:43 PM, said:This brings up another question - what is the difference between setting the viewport width and height and setting the backbuffer width and height?
I set my game dimensions like so -
public static int ScreenWidth = 1280; public static int ScreenHeight = 720; protected override void Initialize() { graphics.PreferredBackBufferWidth = ScreenWidth; graphics.PreferredBackBufferHeight = ScreenHeight; graphics.ApplyChanges(); base.Initialize(); }
I like that idea more to be honest..
I also now get it that if I want to use the screenwidth in other classes, I need to declare them public static ... But why is the static so important there? Shouldnt public itself let me declare stuff from other classes? -
In Topic: XNA C#: How to use ScreenWidth in other classes?
Posted 22 Sep 2012
I just kinda solved it with giving my Ball class constructor extra 2 arguments. Int newScreenWidth and int newScreenHeight . That seems a bit odd way of handling it tho it works... but what would be the correct way? -
In Topic: XNA Beginner questions/confirmation of knowledge thusfar.
Posted 16 Sep 2012
Cant thank you enough for answering. Definitely got more understanding. I have NO idea how i managed to skip http://rbwhitaker.wikidot.com .. I guess the page just looked so bad that I didn't think anything of it... now im thinking its a really good place to find answers to all of my other questions.
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Click here to e-mail me
Friends
MheQ hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
MheQ has no profile comments yet. Why not say hello?