using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlatformMove : MonoBehaviour
{
    
    public float speed = 2f, speedUp = 0.1f, levelDifficulty = 1f;
    public int level = 0;
    // Start is called before the first frame update
    void Start()
    {
        if (level == 0) levelDifficulty = 1f;
        else if (level == 1) levelDifficulty = 1.2f;
        else if (level == 2) levelDifficulty = 1.4f;
        else if (level == 3) levelDifficulty = 1.6f;
        else if (level == 4) levelDifficulty = 1.8f;
        else if (level == 1) levelDifficulty = 2f;
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.right * speed *levelDifficulty* Time.deltaTime);
        speed -= speedUp * Time.deltaTime;
    }
}
