Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (counter <= 10)
        {
            difficulty = difficultymult[0];
        }
        if (counter > 10 && counter <= 15)
        {
            difficulty = difficultymult[1];
        }
        if (counter > 15 && counter <= 20)
        {
            difficulty = difficultymult[2];
        }
        if (counter > 20 && counter <= 55)
        {
            difficulty = difficultymult[3];
        }

        if (player.touch == false || player.touch == true && blockmove == true)
        {
            newFloor.transform.position = Vector3.Lerp(newFloor.transform.position, new Vector3(0, newFloor.transform.position.y, 0), difficulty * 0.01f);
        }

        if (timer.timer <= 0 && player.touch == true)
        {
            AddBlock();
            timer.StopResetTime();
            blockmove = true;
        }
    }
Esempio n. 2
0
 private void OnCollisionExit(Collision collision)
 {
     if (collision.gameObject.name == "Floor(Clone)")
     {
         ActivateTrail();
         touch = false;
         timer.StopResetTime();
         newblock.blockmove = false;
     }
 }