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

fix mouseParticle

parent fdc64a49
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,8 +3,8 @@ using System.Collections;
public class mouseParticle : MonoBehaviour {
public Camera camera;
// public EllipsoidParticleEmitter e1;
// public EllipsoidParticleEmitter e2;
public ParticleSystem e1;
public ParticleSystem e2;
public Transform trans;
// Use this for initialization
void Start () {
......@@ -17,28 +17,16 @@ public class mouseParticle : MonoBehaviour {
screenPoint.z = 10;
trans.position = camera.ScreenToWorldPoint(screenPoint);
if (Input.GetMouseButton(0))
if (Input.GetMouseButtonDown(0))
{
if (Input.GetMouseButtonDown(0))
{
time = 0;
}
time += Time.deltaTime;
if (time > 0.49)
{
time = 0.49f;
}
// e1.maxEmission = (0.5f - time) * 60f;
// e1.minEmission = (0.5f - time) * 60f;
// e2.maxEmission = e1.maxEmission / 3f;
// e2.minEmission = e1.minEmission / 3f;
// e1.emit = true;
// e2.emit = true;
e1.Play();
e2.Play();
}
else
if (Input.GetMouseButtonUp(0))
{
// e1.emit = false;
// e2.emit = false;
e1.Stop();
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