add some extra assets FX and SFX
This commit is contained in:
@@ -141,6 +141,11 @@ public class usingDevicesSystem : MonoBehaviour
|
||||
|
||||
public List<multipleInteractionInfo> multipleInteractionInfoList = new List<multipleInteractionInfo> ();
|
||||
|
||||
|
||||
public bool removeDeviceFromPlayerListOnMaxDistance;
|
||||
public float maxDistanceToRemoveDeviceFromPlayerList;
|
||||
|
||||
|
||||
float lastTimePressedButton;
|
||||
bool holdingButton;
|
||||
|
||||
@@ -594,10 +599,16 @@ public class usingDevicesSystem : MonoBehaviour
|
||||
devicePosition = deviceInfoToCheck.deviceTransform.position;
|
||||
|
||||
|
||||
if (deviceInfoToCheck.removeDeviceFromPlayerListOnMaxDistance) {
|
||||
if (removeDeviceFromPlayerListOnMaxDistance || deviceInfoToCheck.removeDeviceFromPlayerListOnMaxDistance) {
|
||||
float distanceToObject = GKC_Utils.distance (transform.position, devicePosition);
|
||||
|
||||
if (distanceToObject > deviceInfoToCheck.maxDistanceToRemoveDeviceFromPlayerList) {
|
||||
float maxDistance = deviceInfoToCheck.maxDistanceToRemoveDeviceFromPlayerList;
|
||||
|
||||
if (removeDeviceFromPlayerListOnMaxDistance) {
|
||||
maxDistance = maxDistanceToRemoveDeviceFromPlayerList;
|
||||
}
|
||||
|
||||
if (distanceToObject > maxDistance) {
|
||||
if (showDetectedDevicesIconOnScreen) {
|
||||
if (deviceInfoToCheck.deviceIcon != null) {
|
||||
Destroy (deviceInfoToCheck.deviceIcon);
|
||||
@@ -1393,7 +1404,7 @@ public class usingDevicesSystem : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//print (usableObjectFound.name + " " + currentDeviceIsPickup);
|
||||
//print (usableObjectFound.name + " " + currentDeviceIsPickup);
|
||||
|
||||
if (currentDeviceIsPickup) {
|
||||
pickUpObject currentPickUpObject = usableObjectFound.GetComponentInParent<pickUpObject> ();
|
||||
|
||||
Reference in New Issue
Block a user