forked from cgvr/DeltaVR
add particle effects to archery range model display
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -15,6 +15,7 @@ public class ModelDisplay : MonoBehaviour
|
||||
public float generatedObjectRotationSpeed = 10f;
|
||||
|
||||
private EventInstance printingSound;
|
||||
private ParticleSystem.EmissionModule particleEmission;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@@ -23,6 +24,9 @@ public class ModelDisplay : MonoBehaviour
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
printingSound.setParameterByName("Occlusion", 0);
|
||||
printingSound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(displayPoint));
|
||||
|
||||
particleEmission = GetComponentInChildren<ParticleSystem>().emission;
|
||||
particleEmission.enabled = false;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -38,6 +42,7 @@ public class ModelDisplay : MonoBehaviour
|
||||
{
|
||||
printingSound.start();
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 0);
|
||||
particleEmission.enabled = true;
|
||||
}
|
||||
|
||||
public void DisplayModel(GameObject modelObject)
|
||||
@@ -57,5 +62,6 @@ public class ModelDisplay : MonoBehaviour
|
||||
Model = modelObject;
|
||||
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
particleEmission.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user