add some extra assets FX and SFX
This commit is contained in:
@@ -444,6 +444,16 @@ public class gravityGun : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
objectToPlaceSystem currentObjectToPlaceSystem = objectHeld.GetComponent<objectToPlaceSystem> ();
|
||||
|
||||
if (currentObjectToPlaceSystem != null) {
|
||||
if (currentObjectToPlaceSystem.isAdjustingObjectToPlaceInProcess ()) {
|
||||
objectHeld = null;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentGrabObjectProperties != null) {
|
||||
if (currentGrabObjectProperties.useExtraGrabDistance) {
|
||||
currentGrabExtraDistance = currentGrabObjectProperties.getExtraGrabDistance ();
|
||||
@@ -499,8 +509,6 @@ public class gravityGun : MonoBehaviour
|
||||
currentGrabObjectEventSystem.callEventOnGrab ();
|
||||
}
|
||||
|
||||
objectToPlaceSystem currentObjectToPlaceSystem = objectHeld.GetComponent<objectToPlaceSystem> ();
|
||||
|
||||
if (currentObjectToPlaceSystem != null) {
|
||||
currentObjectToPlaceSystem.setObjectInGrabbedState (true);
|
||||
}
|
||||
@@ -656,6 +664,8 @@ public class gravityGun : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
objectToPlaceSystem currentObjectToPlaceSystem = null;
|
||||
|
||||
if (objectHeld != null) {
|
||||
//set the tag of the object that had before grab it, and if the object has its own gravity, enable again
|
||||
if (grabbedObjectTagLayerStored) {
|
||||
@@ -735,7 +745,7 @@ public class gravityGun : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
objectToPlaceSystem currentObjectToPlaceSystem = objectHeld.GetComponent<objectToPlaceSystem> ();
|
||||
currentObjectToPlaceSystem = objectHeld.GetComponent<objectToPlaceSystem> ();
|
||||
|
||||
if (currentObjectToPlaceSystem != null) {
|
||||
currentObjectToPlaceSystem.setObjectInGrabbedState (false);
|
||||
@@ -762,6 +772,10 @@ public class gravityGun : MonoBehaviour
|
||||
if (showDebugPrint) {
|
||||
print ("drop object");
|
||||
}
|
||||
|
||||
if (currentObjectToPlaceSystem != null) {
|
||||
currentObjectToPlaceSystem.checkObjectsAround ();
|
||||
}
|
||||
}
|
||||
|
||||
public void checkJointsInObject (GameObject objectToThrow, float force)
|
||||
|
||||
Reference in New Issue
Block a user