コード例 #1
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<SlingshotProxy>();
     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 <SlingshotProxy>();
        slingshot.SetProjectile(this);
        smoothRigidbody = GetComponent <uLinkSmoothRigidbodyImproved>();
        disablePhysics();
        transform.parent   = slingshot.transform;
        transform.position = slingshot.transform.position;
    }
コード例 #3
0
 private void getSlingshot()
 {
     slingshot = GetComponentInChildren<SlingshotProxy>();
 }
コード例 #4
0
 private void getSlingshot()
 {
     slingshot = GetComponentInChildren <SlingshotProxy>();
 }