Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()

    {
        instantiateCoin.instantiateCoin();
        instantiateCoin.setCanInstantiate(false);
        horizontalSlider.transform.position = new Vector3(horizontalPoints[0].position.x, horizontalPoints[0].position.y, horizontalSlider.transform.position.z);
        verticalSlider.transform.position   = new Vector3(vertcalPoints[0].position.x, vertcalPoints[0].position.y, verticalSlider.transform.position.z);
    }
Exemplo n.º 2
0
    IEnumerator Wating()
    {
        yield return(new WaitForSeconds(2f));

        rigidBody.isKinematic = true;
        transform.position    = StartPos.position;
        transform.localScale  = new Vector3(0.05f, 0.05f, 1);
        isgoal = false;
        instantiateCoin.setCanInstantiate(true);
        slider.setStage(false);
        main.setAttempts();
        if (isSuccessed == false)
        {
            main.setLoseAttempts();
        }
        isSuccessed = false;
    }
Exemplo n.º 3
0
    IEnumerator InviseCoin(float time, float waitTime)
    {
        yield return(new WaitForSeconds(time));

        for (int i = 0; i < 3; i++)
        {
            objRenderer.color = new Color(objRenderer.color.r, objRenderer.color.g, objRenderer.color.b, 0f);
            yield return(new WaitForSeconds(waitTime));

            objRenderer.color = new Color(objRenderer.color.r, objRenderer.color.g, objRenderer.color.b, 1f);
            yield return(new WaitForSeconds(waitTime));
        }

        InstantiateCoin instantiate = gameObject.GetComponentInParent <InstantiateCoin>();

        instantiate.setCanInstantiate(true);
        instantiate.GetComponentInParent <InstantiateCoin>().instantiateCoin();
        instantiate.GetComponentInParent <InstantiateCoin>().addAttempts();
        instantiate.setStage();
        instantiate.destroyCoin();
    }