void uLink_OnNetworkInstantiate(uLink.NetworkMessageInfo info)
 {
     int ownerViewId = info.networkView.initialData.Read<int>();
     uLink.NetworkView slingshotNetworkView = uLink.NetworkView.Find(new uLink.NetworkViewID(ownerViewId));
     slingshot = slingshotNetworkView.GetComponentInChildren<SlingshotOwner>();
     slingshot.SetProjectile(this);
     smoothRigidbody = GetComponent<uLinkSmoothRigidbodyImproved>();
     disablePhysics();
     transform.parent = slingshot.transform;
     transform.position = slingshot.transform.position;
 }
示例#2
0
    void uLink_OnNetworkInstantiate(uLink.NetworkMessageInfo info)
    {
        int ownerViewId = info.networkView.initialData.Read <int>();

        uLink.NetworkView slingshotNetworkView = uLink.NetworkView.Find(new uLink.NetworkViewID(ownerViewId));
        slingshot = slingshotNetworkView.GetComponentInChildren <SlingshotOwner>();
        slingshot.SetProjectile(this);
        smoothRigidbody = GetComponent <uLinkSmoothRigidbodyImproved>();
        disablePhysics();
        transform.parent   = slingshot.transform;
        transform.position = slingshot.transform.position;
    }
 private void getSlingshot()
 {
     slingshot = GetComponentInChildren<SlingshotOwner>();
 }
示例#4
0
 public void Initialize(Camera camera, SlingshotOwner slingshot)
 {
     this.mainCamera = camera;
     this.slingshot  = slingshot;
     deactivate();
 }
 public void Initialize(Camera camera, SlingshotOwner slingshot)
 {
     this.mainCamera = camera;
     this.slingshot = slingshot;
     deactivate();
 }
示例#6
0
 private void getSlingshot()
 {
     slingshot = GetComponentInChildren <SlingshotOwner>();
 }