Jump to content

Search the Community

Showing results for tags 'wait'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Proyectos
    • Offtopic
    • Unity Feeds
    • Website
    • Youtube
  • Mesa de ayuda
    • Unity
    • Arte
    • Builds & Dispositivos
    • Otras Especialidades
  • Aportes de la Comunidad
    • Recursos
    • Eventos
  • Bolsa de trabajo & Colaboraciones
    • Ofertas y Demandas
  • Post Antiguos
    • General (Antiguo)

Blogs

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Especialidad

Found 1 result

  1. Probando el yield WaitForSeconds en update me da un error "noseque de...coroutines" no he usado nunca las coroutines y no se muy bien como implementarlas en este codigo. Es un objeto que sigue al jugador que esta activado, pero al activarse "thirddispara" quiero que espere 1 seg. antes de seguirlo. ¿como deberia implementar el segundo de espera? var third : GameObject; var thirddispara : GameObject; var target1: Transform; var target3: Transform; var target3dispara: Transform; var angleb = 0.0; var speed: float; function Update () { var step = speed * Time.deltaTime; if (first.activeSelf == true){ var targetDir1 = target1.position - transform.position; angleb = Vector3.Angle (transform.forward, targetDir1); transform.position = Vector3.MoveTowards(transform.position, target1.position, step); } if (third.activeSelf == true){ var targetDir3 = target3.position - transform.position; angleb = Vector3.Angle (transform.forward, targetDir3); transform.position = Vector3.MoveTowards(transform.position, target3.position, step); } if (thirddispara.activeSelf == true){ //espera un segundo var targetDir3dispara = target3dispara.position - transform.position; angleb = Vector3.Angle (transform.forward, targetDir3); transform.position = Vector3.MoveTowards(transform.position, target3dispara.position, step); } }
UnitySpain © Todos los derechos reservados 2020
×
×
  • Create New...