Skip to content

Commit 9b942d9

Browse files
Couple more comments
1 parent 822d49d commit 9b942d9

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

Assets/Scripts/Gameplay/EntryPoint.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ public static EntryPoint Instance
2424
}
2525

2626
/// <summary>
27-
/// This be called either
28-
/// - By the Menu script that will create it at the game launch (in a "real" game, there could be a Loading scene loaded
27+
/// This is called either by :
28+
/// - the Menu script that will create it at the game launch (in a full game, there could be a Loading scene loaded
2929
/// in first that will create it and display a progress bar possibly)
3030
/// - On the first call to Instance if it wasn't created (in editor only, see comment in that function)
3131
///
3232
/// It take care of creating all globals data and initialize all system that need to be (like databases).
3333
/// </summary>
3434
public static void Create()
3535
{
36-
//in this sample we use the main menu scene as initialisation. That mean going back to main menu can retrigger
37-
//This initialization, so we check if we were already initialized. In a full project, this init would be called
36+
//in this sample we use the main menu scene as initialisation. That mean going back to main menu can trigger again
37+
//this initialization. So we check if we were already initialized. In a full project, this Create would be called
3838
//in a scene only run when the game launch, *before* main menu scene.
3939
if(s_Instance != null)
4040
return;
@@ -48,6 +48,7 @@ public static void Create()
4848

4949
DontDestroyOnLoad(s_Instance);
5050

51+
//This will init the Database and create the lookup dictionary matching an Item ScriptableObject and it's unique ID
5152
s_Instance.ItemDB.Init();
5253

5354
s_Instance.m_PanelInstance = Instantiate(s_Instance.PanelPrefab);

Assets/Scripts/ItemDatabase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
/// <summary>
1010
/// This keep a list of all items in the game, and build a dictionary matching their UniqueId to their instance when the Init
1111
/// function is called (called by the EntryPoint initialization). This allow to have a single entry point to looking up
12-
/// all object in the game (e.g. save file only contain the uniqueId of the item, that is looked up on load in this)
12+
/// all object in the game (e.g. save file only contain the uniqueId of the item, that is looked up on load in this).
13+
/// The Items list is built in the Editor on the ScriptableObject instance.
1314
/// </summary>
1415
[CreateAssetMenu(fileName = "Itemdb.asset", menuName = "SaveLoad/Item Database")]
1516
public class ItemDatabase : ScriptableObject

Assets/Scripts/UI/ConfirmationPopup.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
using System.Collections.Generic;
33
using UnityEngine;
44

5+
/// <summary>
6+
/// A simple popup that display a confirm/cancel button combo and with user defined callback.
7+
/// Used in the SaveGameGrid to confirm overwriting a save file.
8+
/// </summary>
59
public class ConfirmationPopup : MonoBehaviour
610
{
711
private System.Action<bool> m_OnClose;

Assets/Scripts/UI/LoadingPanel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/// <summary>
88
/// Quick helper that will fade a black screen in and out, with the possibility to give a function to call when the fade
9-
/// in finish (so the screen is full dark)
9+
/// is halfway through (so the screen is full dark)
1010
/// </summary>
1111
public class LoadingPanel : MonoBehaviour
1212
{

Assets/Scripts/UI/UIHandler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
using UnityEngine;
55
using UnityEngine.UI;
66

7+
/// <summary>
8+
/// Allow for an access from anywhere to the UI that display the Inventory to easily update it.
9+
/// </summary>
710
public class UIHandler : MonoBehaviour
811
{
912
public static UIHandler Instance => s_Instance;

0 commit comments

Comments
 (0)