Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Engine;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Nolan_s_Pong_Game
- {
- class Pad1
- {
- //Initialize function
- public Pad1() : base("Pad1", 128, 64, "RectHorizontal.png")
- {
- }
- public override void Update()
- {
- //Call base update
- base.Update();
- //press up arrow, move object up
- if (InputManager.IsPressed(Keys.Up))
- {
- Position.Y += 3;
- }
- if (InputManager.IsPressed(Keys.Down))
- {
- Position.Y -=3;
- }
- if (InputManager.IsPressed(Keys.Right))
- {
- Rotation.X += 3;
- }
- if (InputManager.IsPressed(Keys.Left))
- {
- Rotation.X -= 3;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement