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; }
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>(); }
public void Initialize(Camera camera, SlingshotOwner slingshot) { this.mainCamera = camera; this.slingshot = slingshot; deactivate(); }
private void getSlingshot() { slingshot = GetComponentInChildren <SlingshotOwner>(); }