Advertisement
LittleAngel

Simple Tut

Jul 30th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. The most simple tutorial:
  2.  
  3. Create a new project
  4.  
  5. Save the scene as "Main" in the Assets Directory
  6.  
  7. Create a cube, Rename is "Player"
  8.  
  9. Reset the "Player" transform
  10.  
  11. Change the "Player" transform.scale.z to 2
  12.  
  13. Create 2 scripts: Mover, Shooter, Open them for editing
  14.  
  15. Look up "Input.GetAxis" in the docs
  16.  
  17. Copy the contents of the "Update" function into the "Update" in your "Mover" script
  18.  
  19. Look up "Input.GetButton" in the docs
  20.  
  21. Copy the contents of the "Update" function into the "Update" in your "Shooter" script
  22.  
  23. Create a new sphere, Rename it "Shot"
  24.  
  25. Change the "Shot" transform.scale to (0.5, 0.5, 0.5
  26.  
  27. Drag the Sphere into the project view
  28.  
  29. Delete the Sphere from the scene (this makes a prefab of the Sphere)
  30.  
  31. Drag the Sphere Prefab into the "Projectile" slot on the "Player"s "Mover" script
  32.  
  33. Save
  34.  
  35. Play
  36.  
  37. Hold down the Arrow Keys or WASD keys to move, and the Left Mouse button to leave spheres behind
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement