public CameraMan(InputDevice input) { this.input = input; Direction = new Direction(); Position = new WorldPosition(); input.Keyboard.KeyDown += Keyboard_KeyDown; }
public Player (InputDevice input) { keyUp=false;keyDown=false;keyCounter=false;keyClock=false; keyFore=false;keyBack=false;keyLeft=false;keyRight=false; capture_mouse=false; this.input = input; Direction = new Direction(); Position = new WorldPosition(); Health = 20; input.Keyboard.KeyDown += Keyboard_KeyDown; input.Keyboard.KeyUp += Keyboard_KeyUp; input.Mouse.WheelChanged += new EventHandler<MouseWheelEventArgs>(Mouse_WheelChanged); input.Mouse.Move += new EventHandler<MouseMoveEventArgs>(Mouse_Move); }
protected override void OnLoad(EventArgs e) { Logger.Debug("Called OnLoad();"); base.Title = "DynaEngine Sample Game"; //Init User Interface Controller Logger.Debug("Register GUI Controller"); InputDevice = new InputDevice(Mouse, Keyboard); UiController = new GuiController(this); //Texture Manager TextureManager = new TextureController(this); //SoundManager = new SoundManager(this); resize(null, EventArgs.Empty); //Enable OpenGL Modes GL.Enable(EnableCap.DepthTest); GL.Enable(EnableCap.Texture2D); GL.ClearColor(Color.Gray); }