SGD300 - Week 12 Devlog
Introduction
This weeks work was continuing work on Task 3. With only two weeks left before the due date it is time to get the main game loop working, my main goal is to get the names of the items linked to Toggles and have to Toggles tick the correct item when it has been collected.
Goals
1. Add the Mainmenu
2. Set up the Toggles
3. Link the Items that will be collected to the Toggles
4.Set up the Ending Scene
Personnel
Primary - Nathaniel Hughes
Technologies, Tools, and Resources used
Provide resource information for team members who wish to learn additional information from this log.
* [Contributions](Unity Project)
*[Arrays](https://docs.unity3d.com/ScriptReference/Array.html)
*[Lists](https://learn.unity.com/tutorial/lists-and-dictionaries)
*[Toggles](https://docs.unity3d.com/2017.3/Documentation/ScriptReference/UI.Toggle.html)
Tasks Undertaken
1. Finish the Scene
2. Create a Script to handle the Toggle logic
3. Create the Mainmenu scene
4. Link the mainmenu scene to the game scene
5. Create the Credits scene
6. End the game when all toggles are ticked
What we found out
The first step for this week was to create the toggles that will be linked to the items. The toggles themselves have some helpful base options, the first is to check to make sure that the toggles aren't interactable and that they are read only. In the script you will have to create a List<> That will be populated by the toggles and single text variables thta will be populated by the text component of the toggle. The text will be linked to an array of the items. This will allow the toggles to have the names of the items that have to be collected.
I found that to check the toggles you can use the index of the list funtionality of the toggles and link that too the index of the items that have to be collected. This link allows for the corresponding toggles to be checked when the correct item is checked. So if the pickaxe is collected the pickaxe toggle will be checked for the player.
These toggles have to be linked in the pick-up script so the checking of the toggles only runs when the item has been collected by the user. Lastly when all the toggles have been set to isOn == true the scene manager will load the credits scene where the user can return to the main menu to complete the game loop.
Solution Justification
This is the core loop of the game, the player starts at the main menu and can start a new single player game. The next scene is loaded and the user can control a character to collect the items hidden in the game. When all items are collected the scene changers to the credits where the user may return to the mainmenu once more.
Get SGD300
SGD300
Dev Logs for SGD300 Project
More posts
- SGD300 - Week 13 DevlogOct 24, 2019
- SGD300 - Week 11 DevlogOct 13, 2019
- SGD300 - week 10 DevlogSep 29, 2019
- SGD300 - week 9 DevlogSep 22, 2019
- SGD300 - week 8 DevlogSep 14, 2019
- SGD300 - week 7 DevlogSep 05, 2019
- SGD300 - week 6 DevlogAug 29, 2019
- SGD300 - week 5 DevlogAug 22, 2019
- SGD300 - week 4 DevlogAug 15, 2019
Leave a comment
Log in with itch.io to leave a comment.