Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Script para Mover La Plataforma en Forma de Pingpong
Script para Mover La Plataforma en Forma de Pingpong
void Update()
{ if (sw)
{
if (nv > 0)
miPosicion.transform.position = new Vector2(posX + Mathf.PingPong(Time.time * vel, ancho) * sentido, posY +
Mathf.PingPong(Time.time * vel, alto));
nv--;
}
else
miPosicion.transform.position = new Vector2(posX + Mathf.PingPong(Time.time * vel, ancho) * sentido, posY +
Mathf.PingPong(Time.time * vel, alto));
}
}