Projects / Unity / Game prototype

Apple Picker

A mouse-controlled catching game with scoring, lives, and increasing difficulty.

Unity 6000.0.44f1Game prototype10 coursework scripts

Overview

A Unity coursework prototype built around a moving apple tree and player-controlled baskets. The project connects collision handling, a score display, saved high scores, and a game-over scene into a small arcade game loop.

Implementation highlights

Inside the code

Assets/Scripts/Basket.cs

    }

    void Update()
    {
        Vector3 mousePos2D = Input.mousePosition;
        mousePos2D.z = -Camera.main.transform.position.z;

        Vector3 mousePos3D = Camera.main.ScreenToWorldPoint(mousePos2D);

        Vector3 pos = this.transform.position;
        pos.x = mousePos3D.x;
        this.transform.position = pos;
    }

    void OnCollisionEnter(Collision coll)
Browse all C# files

← Back to Unity Game Development