Commit 41999071 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix mouseParticle

parent fdc64a49
...@@ -3,8 +3,8 @@ using System.Collections; ...@@ -3,8 +3,8 @@ using System.Collections;
public class mouseParticle : MonoBehaviour { public class mouseParticle : MonoBehaviour {
public Camera camera; public Camera camera;
// public EllipsoidParticleEmitter e1; public ParticleSystem e1;
// public EllipsoidParticleEmitter e2; public ParticleSystem e2;
public Transform trans; public Transform trans;
// Use this for initialization // Use this for initialization
void Start () { void Start () {
...@@ -17,28 +17,16 @@ public class mouseParticle : MonoBehaviour { ...@@ -17,28 +17,16 @@ public class mouseParticle : MonoBehaviour {
screenPoint.z = 10; screenPoint.z = 10;
trans.position = camera.ScreenToWorldPoint(screenPoint); trans.position = camera.ScreenToWorldPoint(screenPoint);
if (Input.GetMouseButton(0))
{
if (Input.GetMouseButtonDown(0)) if (Input.GetMouseButtonDown(0))
{ {
time = 0; e1.Play();
} e2.Play();
time += Time.deltaTime;
if (time > 0.49)
{
time = 0.49f;
} }
// e1.maxEmission = (0.5f - time) * 60f;
// e1.minEmission = (0.5f - time) * 60f; if (Input.GetMouseButtonUp(0))
// e2.maxEmission = e1.maxEmission / 3f;
// e2.minEmission = e1.minEmission / 3f;
// e1.emit = true;
// e2.emit = true;
}
else
{ {
// e1.emit = false; e1.Stop();
// e2.emit = false; e2.Stop();
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment