Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LTTGMouseInput extends PlayerInput;
- var PrivateWrite IntPoint MousePosition; // Stored mouse position. Set to private write as we don't want other classes to modify it, but still allow other classes to access it.
- /***********************************************************
- ** PlayerInput **
- ***********************************************************/
- event PlayerInput(float DeltaTime)
- {
- // Add the aMouseX & aMouseY to the mouse position and clamp it within the viewport width/height
- MousePosition.X = Clamp(MousePosition.X + aMouseX, 0, myHUD.SizeX);
- MousePosition.Y = Clamp(MousePosition.Y - aMouseY, 0, myHUD.SizeY);
- Super.PlayerInput(DeltaTime);
- }
- /***********************************************************
- ** Exec Functions **
- ***********************************************************/
- exec function IncreaseCamZ()
- {
- if (LTTGCamera(PlayerCamera).CamZ < 3000)
- {
- LTTGCamera(PlayerCamera).CamZ += LTTGCamera(PlayerCamera).CamZ * 1 / 10;
- }
- if (LTTGCamera(PlayerCamera).CamZ >= 3000)
- {
- LTTGCamera(PlayerCamera).CamZ = 3000;
- }
- }
- exec function DecreaseCamZ()
- {
- if (LTTGCamera(PlayerCamera).CamZ > 1000)
- {
- LTTGCamera(PlayerCamera).CamZ -= LTTGCamera(PlayerCamera).CamZ * 1 / 10;
- }
- if (LTTGCamera(PlayerCamera).CamZ <= 1000)
- {
- LTTGCamera(PlayerCamera).CamZ = 1000;
- }
- }
- /***********************************************************
- ** Default Properties **
- ***********************************************************/
- defaultproperties
- {
- }
Add Comment
Please, Sign In to add comment