Tagged Questions
0
votes
1answer
128 views
How to prevent the player from clicking too fast [closed]
I'm having trouble with some bullets in my game, the M1911, which is supposed to be semi-auto is only capable of shooting one projectile per mouse click (trying to learn how to do multiple ones at ...
1
vote
1answer
75 views
Can not enable IME to capture Chinese characters in SharpDX
Just found that direct integration of IME is blocked in Windows 8, moving on to TSF now.
By now, there is lack of Microsoft's Document about TSF, this will be hard.
I am using SharpDX and the ...
1
vote
0answers
38 views
Translating an object with a joypad
I'm trying to move a 3D plane with my mouse joysticks. At the moment my code, inside the Update method, is as follows:
xMin1 += Input.GetAxisRaw("LeftRight");
yMin1 += Input.GetAxisRaw("UpDown");
...
-1
votes
1answer
73 views
XNA Framework doesn't recognise controller [closed]
So just a little bit of XNA code:
if (this.IsActive && (Keyboard.GetState().GetPressedKeys().Length > 0 || Mouse.GetState().LeftButton == ButtonState.Pressed || ...
2
votes
1answer
86 views
Translating a terrains position using input in Unity 3D C#
I am trying to make a terrain in Unity move, but im having trouble. Here's the code i have.
using UnityEngine;
using System.Collections;
public class NewScript : MonoBehaviour {
Camera camera;
...
1
vote
3answers
87 views
Unity3D smooth movement with joypad button press
First off, I'm sorry this is such a silly question, but for the life of me I can't seem to get it to work. And I've just spent the last hour trying to do so.
All I want to do is have my camera move ...
4
votes
5answers
512 views
Input/Output console window in XNA
I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is ...
1
vote
1answer
388 views
Input Handling and Game loop
So, I intercept the WM_KEYDOWN and other messages.
Thing is, my game can't/shouldn't react to these messages just yet, since my game might be currently drawing to the screen or in the middle of ...
5
votes
2answers
604 views
Checking for alternate keys with XNA IsKeyDown
I'm working on picking up XNA and this was a confusing point for me.
KeyboardState keyState = Keyboard.GetState();
if (keyState.IsKeyDown(Keys.Left) || keyState.IsKeyDown(Keys.A))
{
//Do stuff...
...
-2
votes
2answers
251 views
Inputting cheat codes - hidden keyboard input
Okay, here's what I want to do - when the player is at the main menu, I want them to be able to type in cheat codes. That's the only place I want it to work. I don't want to give them a text box to ...
2
votes
1answer
286 views
How to handle input for both UI and game
So I originally had my input system set up with only the game part in mind. It listens to keyup/down events, marks the key as pressed/unpressed and then when the next update comes around, it sends ...
-1
votes
2answers
1k views
C# XNA Handle mouse events?
I'm making a 2D game engine called Clixel over on GitHub. The problem I have relates to two classes, ClxMouse and ClxButton. In it I have a mouse class - the code for that can be viewed here.
...
1
vote
2answers
545 views
Efficiently checking input and firing events
I'm writing an InputHandler class in XNA, and there are several different keys considered valid input (all of type Microsoft.XNA.Framework.Input.Keys). For each key, I have three events:
internal ...
3
votes
3answers
675 views
How to refactor and improve this XNA mouse input code?
Currently I have something like this:
public bool IsLeftMouseButtonDown()
{
return currentMouseState.LeftButton == ButtonState.Pressed && previousMouseSate.LeftButton == ...
3
votes
1answer
937 views
XNA mouse position in windows forms
I am using this code in Update method in XNA RenderControl in Windows Forms:
...
Mouse.WindowHandle = renderControl1.Handle;
MouseState stat=Mouse.GetState();
...
Everything works fine but when I ...