Exemplo n.º 1
0
        private void Update()
        {
            if (!stop)
            {
                if (AnimatedLine == null)
                {
                    return;
                }
                else if (Input.GetMouseButtonUp(0))
                {
                    Vector3 pos = Input.mousePosition;

                    pos = Camera.main.ScreenToWorldPoint(new Vector3(pos.x, pos.y, AnimatedLine.transform.position.z));

                    /*Omitir Area del Boton Terminar*/
                    if (!(pos.x > 10.72 && pos.y < -7.82))
                    {
                        AnimatedLine.Enqueue(pos);
                    }
                }
                else if (Input.GetKey(KeyCode.R))
                {
                    AnimatedLine.ResetAfterSeconds(0.5f, null);
                }
            }

            if (Input.GetMouseButtonUp(1))
            {
                StartCoroutine(LateStart(1f));
                //StopCoroutine("LateStart");
                //AnimatedLine.ResetAfterSeconds(0.5f, null);
            }
        }
Exemplo n.º 2
0
 private void EndFire(Vector3?endPoint)
 {
     endFireToken++;
     endingFiring = true;
     lineRenderer.ResetAfterSeconds(0.2f, endPoint, () =>
     {
         firing       = false;
         endingFiring = false;
     });
 }
Exemplo n.º 3
0
 private void Update()
 {
     if (AnimatedLine == null)
     {
         return;
     }
     else if (Input.GetMouseButton(0))
     {
     }
     else if (Input.GetKey(KeyCode.R))
     {
         AnimatedLine.ResetAfterSeconds(0.5f, null);
     }
 }
Exemplo n.º 4
0
        private void Update()
        {
            if (AnimatedLine == null)
            {
                return;
            }
            else if (Input.GetMouseButton(0))
            {
                Vector3 pos = Input.mousePosition;

                pos = Camera.main.ScreenToWorldPoint(new Vector3(pos.x, pos.y, AnimatedLine.transform.position.z));

                AnimatedLine.Enqueue(pos);
            }
            else if (Input.GetKey(KeyCode.R))
            {
                AnimatedLine.ResetAfterSeconds(0.5f, null);
            }
        }