Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #pragma strict
  2. var object1 : GameObject;
  3. var object2 : GameObject;
  4. var object3 : GameObject;
  5. function Update () {
  6. //##########################Normale Gehbewegung#######ANFANG###########
  7. //#####################################################################
  8. //linke Maustaste
  9. if (Input.GetMouseButtonDown (0)) {
  10. Instantiate(object2,object1.transform.position,object1.transform.rotation);
  11. Destroy (object3);
  12. }
  13. //rechte Maustaste
  14. if (Input.GetMouseButtonDown (1)) {
  15. Instantiate(object3,object1.transform.position,object1.transform.rotation);
  16. Destroy (object2);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement