예제 #1
0
    IEnumerator ExampleCoroutine()
    {
        //Print the time of when the function is first called.
        Debug.Log("Started Coroutine at timestamp : " + Time.time);

        //yield on a new YieldInstruction that waits for 5 seconds.
        yield return(new WaitForSeconds(lerpTime));

        //After we have waited 5 seconds print the time again.
        Debug.Log("Finished Coroutine at timestamp : " + Time.time);

        shouldLerp = false;

        SwiperManagerBtn.event_btn();
        Debug.Log("DOOOU?");
    }
    public void Rechazo()
    {
        rb2d.AddForce(new Vector2(speed, 0));

        Debug.Log("Rechasao");



        //en un futuro muy cercano hay que cambiar el destroy por un cambio de estado a los perfiles de las pizzas

        //cambio de estado "pedida"

        PizzaPedida.State = PizzaState.Rejected;

        Destroy(rb2d.gameObject, 5);

        WhenSpawn.EventRechaso();
        SwiperManagerBtn.event_NoBtn();
    }