Here's the NInput class, in which you can see how to process input. This class is different from The Hazy Mind class in some things like you can read the scroll wheel value etc... Suite it to your needs :)
http://paste.lisp.org/display/40867
The way you use the class: first, create a new object:
NInput input = new NInput();
input.Initialize();
and everytime the frame is updated call
input.Updat(gameTime);
To check for keys:
input.Keys.Contains(Keys.A);
for mouse buttons
input.MouseButtons[0] - left mouse button
input.MouseButtons[1] - middle mouse button
input.MouseButtons[2] - right mouse button
e.g. if (input.MouseButtons[0] == ButtonState.Pressed)
:)
Also, I forgot to mention, set the ViewportCenterX and ViewportCenterY to WindowWidth / 2 and WindowHeight / 2
Well, here's a link to the class
http://paste.lisp.org/display/40830
I will not post the GUI Manager class because I need to modify it a little... Be patient :) So, how to use the class without the GUI Manager. Firstly you need to create it, something like this:
NGUIButtonSimple button = new NGUIButtonSimple(someArgs)
someArgs are arguments you are passing to the function, there are lots of them and they're all explained in the class. Also, you need to modify the class to use the texture you want, but you'll handle it :) If you have any questions, post a comment and it's done! Now, let's go on.
Here's also the NIGUIControl interface
http://paste.lisp.org/display/40832
The next step is whenever your engine is updated, you call the UpdateMouse class. I will also put up my input class later, but for now you will need to change that method.
And everytime you draw, call the RenderControl method, you also need to give it a active sprite batch.
If you change resolution, and want to update the control so it changes its width and height, call the SetResolutionFactor method. The resolution factor is a Vector2, and you can calculate a resolution factor like this:
http://paste.lisp.org/display/40832#1
Well, think that's it :)
Here are some screenshots and info about our new game.
Our engine supports skin based animation, thanks to XNA Creators site who posted a sample.
The engine also supports creation of bounding boxes from model's vertices data.
Fonts support - Nuclex Fonts (visit Nuclex site)
Our engine supports many things, like this one. Suppose you load a model which is contained of few objects named "Box", "Circle", "Head" etc... Every object can have it's own texture and it's own shader, and you can easily change shader parameters e.g. the box is using the same shader as circle, but you want it to be less reflective or change any other parameter, which is done easily.
Now, I'm gonna tell you about a project we're working on. It's called Speeder 2
That's the menu, but the car is downloaded from the net and has some problems. That car will not be in the game, it's just a placeholder!
The menu is done so that it will work on any resolution! I'll post the source code of the NGUISimpleButton class soon :)
Also, we've been working on some parts of the GUI like the message box. It can be created with a single line of code, then add it to the screen manager and voila! Also works on every resolution.
Hello people, and welcome to this blog. Here, you will find many interesting things and I hope, learn something :)
N3DEngine means Nuclear 3D Engine, and it's a 3D engine in development, which for a base has The Hazy Mind engine (visit The Hazy Mind website). Soon, some screenshots are coming :)