CheckWhichZone() iterates through a list of zones to determine if the player is inside any of them. If a zone contains the player's position, it sets a corresponding flag in an array to true and updates the player's current zone.
CheckIfZoneUnlocked() checks if the current zone where the player is located is unlocked. It examines the flags set in the array during the previous method and verifies if the associated zone is unlocked. If both conditions are met, it returns true; otherwise, it returns false.
FixedUpdate() is part of a Unity C# script that handles the physics-related logic for controlling a boat or similar object. It calculates the effective speed based on user input and applies it to the object's rigidbody velocity. Fuel consumption is also managed, and the boat can decelerate if no input is detected. It includes checks for user input, boat usability, and invokes separate functions for turning and general movement.
Update() is responsible for updating the fuel UI, refilling fuel on a key press, and invoking a function for landing when the boat is not usable.
This code defines a method DistToObjects that takes a list of objects (Interactable) as a parameter and calculates the distances between the current object (with this script) and each object in the provided list.
The method calculates distances between the current object and a list of interactable objects, updates their "inRadius" status, triggers events, and removes objects that are beyond a specified radius.
This Unity C# code defines a method FollowWorldToCanvas that positions a UI element (UI_Element)
on a Canvas based on the position of a world object (WorldObject) relative to the camera.
This method ensures that a UI element follows a corresponding world object by
converting the world position to viewport and then to canvas space, allowing for dynamic
positioning of UI elements based on their associated world objects.
The Assignment
This project started very strangely for me because I got shifted around from group to group four times before I got placed by my final group whom I completed the projec with. The assignment was to make a game in the style of your choosing and my group chose to make a walkthrough game with some fun mechanics. We had a total of 6 weeks for this game minus the 2-3 weeks I got shifted from group to group. The game was completed in the week of 22-01-2024 and me and my whole group got to present the game at the GLU 2024 expo and got to teach a bunch of people how to play the game. Overall one of my better projects.