示例#1
0
 private void Awake()
 {
     input = GetComponent <PlayerInput>();
     scale = GetComponent <PlayerScale>();
     rb    = GetComponent <Rigidbody2D>();
     ps    = GetComponentInChildren <ParticleSystem>();
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     if (Serializer.IsLoading)
     {
         return;
     }
     speedMultiplier = 2;
     rig             = GameObject.Find("[CameraRig]");
     rb     = rig.GetComponent <Rigidbody>();
     scale  = GameObject.Find("RightController").GetComponent <PlayerScale>();
     head   = GameObject.Find("Camera(head)");
     events = GetComponent <VRTK_ControllerEvents>();
     events.TouchpadTouchStart += new ControllerInteractionEventHandler(DoTouchpadTouchStart);
     events.TouchpadTouchEnd   += new ControllerInteractionEventHandler(DoTouchpadTouchEnd);
     events.TouchpadPressed    += new ControllerInteractionEventHandler(DoRightClick);
 }
 public ChangeSize(PlayerScale scaleObject)
 {
     this.playerScale = scaleObject;
     scaleHistory     = new Stack <Vector3>();
 }