Guest User

problems :/

a guest
Jan 17th, 2012
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. // var newKidName : String = "Whatever" ;
  5. public class RigidAssign2 : MonoBehaviour {
  6. GameObject _camera = null;
  7. GameObject _mouse = null;
  8. GameObject _arm = null;
  9. GameObject _ray = null;
  10. GameObject camera = null;
  11.  
  12. void OnNetworkInstantiate (NetworkMessageInfo msg) {
  13. if (networkView.isMine)
  14. {
  15. NetworkRigidbody _NetworkRigidbody = (NetworkRigidbody)GetComponent("NetworkRigidbody");
  16. _NetworkRigidbody.enabled = false;
  17. _camera = GameObject.Find("Main Camera");
  18. _camera.camera.enabled = true;
  19. GetComponent<MouseLook>().enabled = true;
  20. camera = GameObject.Find("Main CameraRemote");
  21. camera.GetComponent<MouseLook>().enabled = true;
  22. }
  23. else {
  24. name += "Remote";
  25. NetworkRigidbody _NetworkRigidbody2 = (NetworkRigidbody)GetComponent("NetworkRigidbody");
  26. _NetworkRigidbody2.enabled = true;
  27. camera = GameObject.Find("Main CameraRemote");
  28. camera.GetComponent<MouseLook>().enabled = false;
  29. GetComponent<FPSInputController>().enabled = false;
  30. GetComponent<CharacterMotor>().enabled = false;
  31. }
  32. }
  33. }
RAW Paste Data