Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        transform.Translate(new Vector3(-Time.deltaTime * 550 / speed, 0, 0));
        time += Time.deltaTime;

        if (transform.position.x <= -100)
        {
            manager.DeleteElement(gameObject);
            Destroy(gameObject);
            manager.retry();
        }
    }