Advertisement
Guest User

Untitled

a guest
Oct 8th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using UnityEngine;
  2. public class scrolling : MonoBehaviour
  3. {
  4.     public float speeds = 0.055f;
  5.     void FixedUpdate(){
  6.         Vector3 dpkm = new Vector3 ();
  7.  
  8.         if (Input.GetKey (KeyCode.Q)) {
  9.             dpkm.x -= speeds;
  10.         }
  11.  
  12.         if (Input.GetKey (KeyCode.D)) {
  13.             dpkm.x += speeds;
  14.         }
  15.         transform.position += dpkm;
  16.  
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement