mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
fix dumb dreamworldspawnanimator return goof
This commit is contained in:
parent
4c6e8dbaae
commit
68110660e9
@ -16,6 +16,13 @@ public class DreamWorldSpawnAnimator : MonoBehaviour
|
|||||||
{
|
{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
|
|
||||||
|
_spawnEffectMaterial = GetSpawnMaterial();
|
||||||
|
_spawnEffectMaterial.SetFloat("_Enabled", 0f);
|
||||||
|
_spawnEffectMaterial.SetFloat("_Progression", 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Material GetSpawnMaterial()
|
||||||
|
{
|
||||||
foreach (var renderer in GetComponentsInChildren<Renderer>(true))
|
foreach (var renderer in GetComponentsInChildren<Renderer>(true))
|
||||||
{
|
{
|
||||||
foreach (var material in renderer.sharedMaterials)
|
foreach (var material in renderer.sharedMaterials)
|
||||||
@ -27,14 +34,12 @@ public class DreamWorldSpawnAnimator : MonoBehaviour
|
|||||||
|
|
||||||
if (material.shader.name == "DreamWorldSpawnEffect")
|
if (material.shader.name == "DreamWorldSpawnEffect")
|
||||||
{
|
{
|
||||||
_spawnEffectMaterial = material;
|
return material;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_spawnEffectMaterial.SetFloat("_Enabled", 0f);
|
return null;
|
||||||
_spawnEffectMaterial.SetFloat("_Progression", 0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartSpawnEffect()
|
public void StartSpawnEffect()
|
||||||
|
Loading…
Reference in New Issue
Block a user