forked from cgvr/DeltaVR
add particle effects to 3d printer
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
* shape detection:
|
||||
* professor võiks öelda "good job, continue..." pärast esimest successi
|
||||
* kui kõik configurationid tehtud, siis professor ütleb "thank you"
|
||||
* particle effectid 3d printerile
|
||||
* peab mängijale kuidagi selgitama, kuidas scale'ida prinditud objekte
|
||||
* prinditud objekti scale'imisele min ja max size limiit
|
||||
* archery range:
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -61,6 +61,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 477664049993571214}
|
||||
- {fileID: 2248512212630256202}
|
||||
- {fileID: 4781418540940485493}
|
||||
m_Father: {fileID: 2677144248130434687}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -89,12 +90,12 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2797224049630913737}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.3060726, y: 0, z: 0}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2677144248130434687}
|
||||
m_Father: {fileID: 6811284554916002137}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!198 &6638441940120655076
|
||||
@@ -351,7 +352,7 @@ ParticleSystem:
|
||||
startSize:
|
||||
serializedVersion: 2
|
||||
minMaxState: 0
|
||||
scalar: 1
|
||||
scalar: 0.5
|
||||
minScalar: 1
|
||||
maxCurve:
|
||||
serializedVersion: 2
|
||||
@@ -815,7 +816,7 @@ ParticleSystem:
|
||||
sphericalDirectionAmount: 0
|
||||
randomPositionAmount: 0
|
||||
radius:
|
||||
value: 1
|
||||
value: 0.1
|
||||
mode: 0
|
||||
spread: 0
|
||||
speed:
|
||||
@@ -5361,7 +5362,6 @@ Transform:
|
||||
- {fileID: 6811284554916002137}
|
||||
- {fileID: 9144315919467176582}
|
||||
- {fileID: 838688587096854655}
|
||||
- {fileID: 4781418540940485493}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
||||
Binary file not shown.
@@ -11,6 +11,7 @@ public class Printer3D : MonoBehaviour
|
||||
|
||||
private bool isPrinting = false;
|
||||
private EventInstance printingSound;
|
||||
private ParticleSystem.EmissionModule particleEmission;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@@ -19,6 +20,9 @@ public class Printer3D : MonoBehaviour
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
printingSound.setParameterByName("Occlusion", 0);
|
||||
printingSound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(spawnPoint));
|
||||
|
||||
particleEmission = GetComponentInChildren<ParticleSystem>().emission;
|
||||
particleEmission.enabled = false;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -32,6 +36,7 @@ public class Printer3D : MonoBehaviour
|
||||
isPrinting = true;
|
||||
printingSound.start();
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 0);
|
||||
particleEmission.enabled = true;
|
||||
|
||||
string encodedTexture = Convert.ToBase64String(texture.EncodeToJPG());
|
||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||
@@ -40,6 +45,7 @@ public class Printer3D : MonoBehaviour
|
||||
InitializeSpawnedObject(spawnedObject);
|
||||
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
particleEmission.enabled = false;
|
||||
isPrinting = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user