feature: add in logging utility and replace debug logging

This commit is contained in:
Dane Miller 2024-07-25 11:42:24 -05:00
parent 772c8356e7
commit d4d08d9d02
83 changed files with 137527 additions and 138532 deletions

View File

@ -5,59 +5,102 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="47606719-2968-4305-803e-946819e5b507" name="Changes" comment=""> <list default="true" id="47606719-2968-4305-803e-946819e5b507" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h13m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 08h29m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h13m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 08h29m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h18m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 09h11m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h18m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 09h11m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h21m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h02m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h21m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h02m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h26m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h07m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h26m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h07m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h31m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h12m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h31m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h12m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h36m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h18m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h36m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h18m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h41m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h28m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h41m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h28m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h46m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h33m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h46m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h33m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h51m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h52m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h51m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h52m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h56m.unity" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 12h13m.unity" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h56m.unity.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 12h13m.unity.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LoadingCanvas.prefab" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LabeledInput.prefab" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LoadingCanvas.prefab.meta" afterDir="false" /> <change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LabeledInput.prefab.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LeftOutButton.prefab" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/LeftOutButton.prefab.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/RightOutButton.prefab" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/RightOutButton.prefab.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scripts/UI/NewGameMenuUIController.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scripts/UI/NewGameMenuUIController.cs.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scripts/Utils/GameLogger.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scripts/Utils/GameLogger.cs.meta" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.evershade/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.evershade/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/.idea.evershade/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.evershade/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h12m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Art/Unorganized/Simple Pixel Gui #1/Pre made/Character/All elements/Name element 01.png.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Art/Unorganized/Simple Pixel Gui #1/Pre made/Character/All elements/Name element 01.png.meta" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h12m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h13m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h17m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h13m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h17m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h18m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h22m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h18m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h22m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h21m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h27m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h21m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h27m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h26m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h33m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h26m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h33m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h31m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h38m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h31m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h38m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h36m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h43m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h36m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h43m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h41m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h48m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h41m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h48m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h46m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h53m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h46m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 10h53m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h51m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h00m.unity" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h51m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 11h00m.unity.meta" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h56m.unity" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/AutoSave/AutoSave [StartMenu.unity] 17h56m.unity.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/DefaultPrefabObjects.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/DefaultPrefabObjects.asset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/SceneChangeTrigger.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/SceneChangeTrigger.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/SimpleGameManager.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/SimpleGameManager.prefab" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/SimpleGameManager.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/SimpleGameManager.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/DefaultPanel.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/DefaultPanel.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/SliderGroup.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/SliderGroup.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/UICanvas.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Prefabs/UI/UICanvas.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scenes/StartMenu.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/StartMenu.unity" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scenes/StartMenu.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/StartMenu.unity" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Components/UI/ItemComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Components/UI/ItemComponent.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Components/UI/SlotComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Components/UI/SlotComponent.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/ConnectionStarter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/ConnectionStarter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/GameInit.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/GameInit.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Handlers/InteractiveHander.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Handlers/InteractiveHander.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Handlers/ItemHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Handlers/ItemHandler.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Handlers/SlotHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Handlers/SlotHandler.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Handlers/TileHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Handlers/TileHandler.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/CropManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/CropManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/GameManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/GameManager.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/GameManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/GameManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/GameTimeManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/GameTimeManager.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/GameTimeManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/GameTimeManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/GridManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/GridManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/HotkeyManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/HotkeyManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/InteractableManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/InteractableManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/Item/EquipmentManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/Item/EquipmentManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/Item/InventoryManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/Item/InventoryManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/MapManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/MapManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/PlayerManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/PlayerManager.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/PlayerManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/PlayerManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/PrefabManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/PrefabManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/SaveManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/SaveManager.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/SaveManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/SaveManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Managers/UIManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Managers/UIManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/PlayerController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/PlayerController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/SceneLoader.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SceneLoader.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/SceneLoader.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SceneLoader.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Types/GameState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Types/GameState.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/Types/GamePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Types/GamePlayer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/BoxUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/BoxUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/EquipmentUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/EquipmentUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/GameTimeUIManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/GameTimeUIManager.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/GameTimeUIManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/GameTimeUIManager.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/HotkeyUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/HotkeyUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/InventoryUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/InventoryUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/LoadMenuUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/LoadMenuUIController.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/LoadMenuUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/LoadMenuUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/MainMenuUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/MainMenuUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/NetworkChatUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/NetworkChatUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/NetworkUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/NetworkUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/SettingsMenuUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/SettingsMenuUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/ToolbarUIController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/ToolbarUIController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Utils/NetworkManagerHelper.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Utils/NetworkManagerHelper.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/TextMesh Pro/Fonts/Retro Gaming.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/TextMesh Pro/Fonts/Retro Gaming.asset" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -70,11 +113,17 @@
<component name="HighlightingSettingsPerFile"> <component name="HighlightingSettingsPerFile">
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/0cb224eb538e444dafbd4350240431dcc5200/7b/5da1809e/LocalConnectionState.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/0cb224eb538e444dafbd4350240431dcc5200/7b/5da1809e/LocalConnectionState.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/d44b17e136d09081da1e8fd0e8c83fde60e11818b9f2442d7ed8cb733fae895e/System.Collections.Generic.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/d44b17e136d09081da1e8fd0e8c83fde60e11818b9f2442d7ed8cb733fae895e/System.Collections.Generic.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/CodeGenerating/Extension/FieldDefinitionExtensions.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/CodeGenerating/Processing/SyncTypeProcessor.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Editor/PrefabCollectionGenerator/Generator.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Generated/Component/Spawning/PlayerSpawner.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Generated/Component/Spawning/PlayerSpawner.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/InstanceFinder.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Client/ClientManager.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Client/ClientManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Logging/LevelLoggingConfiguration.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Logging/LevelLoggingConfiguration.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/NetworkManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Server/Object/ServerObjects.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Server/Object/ServerObjects.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Server/ServerManager.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Server/ServerManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Managing/Timing/TimeManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/NetworkBehaviour.Callbacks.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/NetworkBehaviour.Callbacks.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/NetworkBehaviour.QOL.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/NetworkBehaviour.QOL.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/Synchronizing/SyncVar.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.firstgeargames.fishnet@c0fc71e014/Runtime/Object/Synchronizing/SyncVar.cs" root0="SKIP_HIGHLIGHTING" />
@ -84,6 +133,7 @@
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.ugui@1.0.0/Editor/UI/SpriteDrawUtility.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.ugui@1.0.0/Editor/UI/SpriteDrawUtility.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutGroup.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutGroup.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Utility/ReflectionMethodsCache.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/Managers/GameManager.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/Managers/GameManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/Managers/PlayerManager.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/Managers/PlayerManager.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/PlayerController.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/../evershade_clone_0/Assets/Scripts/PlayerController.cs" root0="SKIP_HIGHLIGHTING" />
@ -120,7 +170,7 @@
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;rider.code.cleanup.on.save&quot;: &quot;true&quot;, &quot;rider.code.cleanup.on.save&quot;: &quot;true&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.keymap&quot;, &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}, },
&quot;keyToStringList&quot;: { &quot;keyToStringList&quot;: {
@ -186,7 +236,10 @@
<workItem from="1721138629015" duration="3638000" /> <workItem from="1721138629015" duration="3638000" />
<workItem from="1721142580942" duration="107349000" /> <workItem from="1721142580942" duration="107349000" />
<workItem from="1721655966357" duration="12591000" /> <workItem from="1721655966357" duration="12591000" />
<workItem from="1721672428730" duration="12332000" /> <workItem from="1721672428730" duration="19126000" />
<workItem from="1721839050036" duration="5350000" />
<workItem from="1721912978679" duration="6819000" />
<workItem from="1721919814861" duration="5050000" />
</task> </task>
<servers /> <servers />
</component> </component>

View File

@ -45,7 +45,7 @@ TextureImporter:
compressionQuality: 50 compressionQuality: 50
spriteMode: 1 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 0
alignment: 0 alignment: 0
spritePivot: {x: 0.5, y: 0.5} spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 32 spritePixelsToUnits: 32

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,7 @@ MonoBehaviour:
- {fileID: 4389826269833822398, guid: ccfbcf013069a46b6abfcbb29b6728f6, type: 3} - {fileID: 4389826269833822398, guid: ccfbcf013069a46b6abfcbb29b6728f6, type: 3}
- {fileID: 1155193144633609695, guid: d27075628330ae74082130fac9663ba3, type: 3} - {fileID: 1155193144633609695, guid: d27075628330ae74082130fac9663ba3, type: 3}
- {fileID: 7500446676508545717, guid: 59b693825ff89ae4b9e44b83dfd8995a, type: 3} - {fileID: 7500446676508545717, guid: 59b693825ff89ae4b9e44b83dfd8995a, type: 3}
- {fileID: 5186788049215247401, guid: 71d12b53bfe275a42b91a98a3e6e2f66, type: 3}
- {fileID: 1155193144633609695, guid: 04359b8867a2d794aad6b521a16e8d21, type: 3} - {fileID: 1155193144633609695, guid: 04359b8867a2d794aad6b521a16e8d21, type: 3}
- {fileID: -2542377431188024441, guid: ec6b0b736b8df5645b048f732b88473e, type: 3} - {fileID: -2542377431188024441, guid: ec6b0b736b8df5645b048f732b88473e, type: 3}
- {fileID: 3253055754781524931, guid: 84925f66541b72d48bff705463be621f, type: 3} - {fileID: 3253055754781524931, guid: 84925f66541b72d48bff705463be621f, type: 3}

View File

@ -127,7 +127,7 @@ MonoBehaviour:
Rotation: {x: 0, y: 0, z: 0, w: 1} Rotation: {x: 0, y: 0, z: 0, w: 1}
LocalScale: {x: 1, y: 1, z: 1} LocalScale: {x: 1, y: 1, z: 1}
_isNetworked: 1 _isNetworked: 1
_isSpawnable: 0 _isSpawnable: 1
_isGlobal: 0 _isGlobal: 0
_initializeOrder: 0 _initializeOrder: 0
_defaultDespawnType: 0 _defaultDespawnType: 0

View File

@ -10,8 +10,8 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1878198276469643664} - component: {fileID: 1878198276469643664}
- component: {fileID: 99402216570785473} - component: {fileID: 99402216570785473}
- component: {fileID: 8718437389722714938}
- component: {fileID: 1155193144633609695} - component: {fileID: 1155193144633609695}
- component: {fileID: -7210430822377132031}
m_Layer: 5 m_Layer: 5
m_Name: SimpleGameManager m_Name: SimpleGameManager
m_TagString: Untagged m_TagString: Untagged
@ -59,23 +59,6 @@ MonoBehaviour:
uiManager: {fileID: 0} uiManager: {fileID: 0}
ownerPlayerManager: {fileID: 0} ownerPlayerManager: {fileID: 0}
itemDatabase: {fileID: 0} itemDatabase: {fileID: 0}
--- !u!114 &8718437389722714938
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1099441969732328810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6f2c9a43837d45a9b0a1b0ad3194b4d9, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 255
_addedNetworkObject: {fileID: 1155193144633609695}
_networkObjectCache: {fileID: 0}
isPaused: 1
isFirstDay: 1
--- !u!114 &1155193144633609695 --- !u!114 &1155193144633609695
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -93,6 +76,7 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0} <PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours: _networkBehaviours:
- {fileID: 99402216570785473} - {fileID: 99402216570785473}
- {fileID: -7210430822377132031}
<SerializedRootNetworkBehaviour>k__BackingField: {fileID: 0} <SerializedRootNetworkBehaviour>k__BackingField: {fileID: 0}
<NestedRootNetworkBehaviours>k__BackingField: [] <NestedRootNetworkBehaviours>k__BackingField: []
SerializedTransformProperties: SerializedTransformProperties:
@ -118,7 +102,24 @@ MonoBehaviour:
_spectatorInterpolation: 2 _spectatorInterpolation: 2
_enableTeleport: 0 _enableTeleport: 0
_teleportThreshold: 1 _teleportThreshold: 1
<PrefabId>k__BackingField: 20 <PrefabId>k__BackingField: 21
<SpawnableCollectionId>k__BackingField: 0 <SpawnableCollectionId>k__BackingField: 0
<SceneId>k__BackingField: 0 <SceneId>k__BackingField: 0
<AssetPathHash>k__BackingField: 9960890010809320037 <AssetPathHash>k__BackingField: 9960890010809320037
--- !u!114 &-7210430822377132031
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1099441969732328810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6f2c9a43837d45a9b0a1b0ad3194b4d9, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 1155193144633609695}
_networkObjectCache: {fileID: 1155193144633609695}
isPaused: 0
isFirstDay: 1

View File

@ -166,6 +166,7 @@ RectTransform:
- {fileID: 8603119239203945051} - {fileID: 8603119239203945051}
- {fileID: 6859835934696587345} - {fileID: 6859835934696587345}
- {fileID: 5927978166471463976} - {fileID: 5927978166471463976}
- {fileID: 7137147076312229971}
m_Father: {fileID: 4208579168571871308} m_Father: {fileID: 4208579168571871308}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
@ -348,16 +349,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6523888384023943623} m_GameObject: {fileID: 6523888384023943623}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 4208579168571871308} m_Father: {fileID: 895668927964001501}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 64.2, y: 101.3} m_AnchoredPosition: {x: 20.149994, y: 21.549988}
m_SizeDelta: {x: 19, y: 19} m_SizeDelta: {x: 19, y: 19}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5237919239994163330 --- !u!222 &5237919239994163330
@ -429,7 +430,6 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 895668927964001501} - {fileID: 895668927964001501}
- {fileID: 7137147076312229971}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}

View File

@ -0,0 +1,689 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2767841274663262938
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9069923948152577186}
m_Layer: 5
m_Name: LabeledInput
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9069923948152577186
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2767841274663262938}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7369540557001329201}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 117.6, y: 67.7}
m_SizeDelta: {x: 160, y: 18}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3470145692703854889
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6276101644061749061}
- component: {fileID: 2245155860380307913}
- component: {fileID: 996696476859272530}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6276101644061749061
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3470145692703854889}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 890516139976730157}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 2.2}
m_SizeDelta: {x: 0, y: 4.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2245155860380307913
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3470145692703854889}
m_CullTransparentMesh: 1
--- !u!114 &996696476859272530
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3470145692703854889}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u200B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 13cebca996ee5ef4eb2c9561d98bba55, type: 2}
m_sharedMaterial: {fileID: 4725839695304240861, guid: 13cebca996ee5ef4eb2c9561d98bba55, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 1
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3958104024978589640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 890516139976730157}
- component: {fileID: 5236919279644529228}
m_Layer: 5
m_Name: Input
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &890516139976730157
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3958104024978589640}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6700081158363568305}
- {fileID: 6276101644061749061}
m_Father: {fileID: 7369540557001329201}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.5}
m_SizeDelta: {x: -20, y: -13}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5236919279644529228
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3958104024978589640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding: {x: -8, y: -5, z: -8, w: -5}
m_Softness: {x: 0, y: 0}
--- !u!1 &5851149419368305811
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7369540557001329201}
- component: {fileID: 1996437368472703004}
- component: {fileID: 5538393904854499265}
- component: {fileID: 1200941816367765825}
m_Layer: 5
m_Name: InputField (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7369540557001329201
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5851149419368305811}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 890516139976730157}
- {fileID: 1113787115915871706}
m_Father: {fileID: 9069923948152577186}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 18}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1996437368472703004
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5851149419368305811}
m_CullTransparentMesh: 1
--- !u!114 &5538393904854499265
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5851149419368305811}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 132cb4677bafc4f76869d43453b48aeb, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1200941816367765825
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5851149419368305811}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5538393904854499265}
m_TextViewport: {fileID: 890516139976730157}
m_TextComponent: {fileID: 996696476859272530}
m_Placeholder: {fileID: 8776994336543323008}
m_VerticalScrollbar: {fileID: 0}
m_VerticalScrollbarEventHandler: {fileID: 0}
m_LayoutGroup: {fileID: 0}
m_ScrollSensitivity: 1
m_ContentType: 0
m_InputType: 0
m_AsteriskChar: 42
m_KeyboardType: 0
m_LineType: 0
m_HideMobileInput: 0
m_HideSoftKeyboard: 0
m_CharacterValidation: 0
m_RegexValue:
m_GlobalPointSize: 14
m_CharacterLimit: 0
m_OnEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnSubmit:
m_PersistentCalls:
m_Calls: []
m_OnSelect:
m_PersistentCalls:
m_Calls: []
m_OnDeselect:
m_PersistentCalls:
m_Calls: []
m_OnTextSelection:
m_PersistentCalls:
m_Calls: []
m_OnEndTextSelection:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
m_OnTouchScreenKeyboardStatusChanged:
m_PersistentCalls:
m_Calls: []
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text:
m_CaretBlinkRate: 0.85
m_CaretWidth: 1
m_ReadOnly: 0
m_RichText: 1
m_GlobalFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_OnFocusSelectAll: 1
m_ResetOnDeActivation: 1
m_RestoreOriginalTextOnEscape: 1
m_isRichTextEditingAllowed: 0
m_LineLimit: 0
m_InputValidator: {fileID: 0}
--- !u!1 &6974401305877634112
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1113787115915871706}
- component: {fileID: 2846380948592136584}
- component: {fileID: 8116043796025580879}
m_Layer: 5
m_Name: LabelText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1113787115915871706
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6974401305877634112}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7369540557001329201}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 8.9, y: -27.9}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2846380948592136584
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6974401305877634112}
m_CullTransparentMesh: 1
--- !u!114 &8116043796025580879
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6974401305877634112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'LABEL:'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ee17ee87c14d246f38cbe2c8a1cec0e1, type: 2}
m_sharedMaterial: {fileID: -8048755085655319686, guid: ee17ee87c14d246f38cbe2c8a1cec0e1, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8497429822572990008
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6700081158363568305}
- component: {fileID: 3461302571039255470}
- component: {fileID: 8776994336543323008}
- component: {fileID: 4725475841390181690}
m_Layer: 5
m_Name: Placeholder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6700081158363568305
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8497429822572990008}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 890516139976730157}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 2.2}
m_SizeDelta: {x: 0, y: 4.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3461302571039255470
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8497429822572990008}
m_CullTransparentMesh: 1
--- !u!114 &8776994336543323008
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8497429822572990008}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Enter text...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 13cebca996ee5ef4eb2c9561d98bba55, type: 2}
m_sharedMaterial: {fileID: 4725839695304240861, guid: 13cebca996ee5ef4eb2c9561d98bba55, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 2150773298
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 1
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &4725475841390181690
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8497429822572990008}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac101023d7dcd4cfea9b8e3e54a7366c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,324 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &69695208276434813
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8042175405595845778}
- component: {fileID: 4791439872656588006}
- component: {fileID: 6206996845589327890}
m_Layer: 5
m_Name: LeftButtonBg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8042175405595845778
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8836820119287167933}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000019073486, y: -0.000015258789}
m_SizeDelta: {x: 69, y: 21}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4791439872656588006
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_CullTransparentMesh: 1
--- !u!114 &6206996845589327890
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1063b838cc43b4e52b4eb355010deff6, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &185028345837866954
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8836820119287167933}
m_Layer: 5
m_Name: LeftOutButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8836820119287167933
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 185028345837866954}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8042175405595845778}
- {fileID: 9193054193171193113}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -26.2, y: -74.3}
m_SizeDelta: {x: 69, y: 21}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &938355235885200111
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3999461166807802793}
- component: {fileID: 7855310936349348646}
- component: {fileID: 2949625200535432172}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3999461166807802793
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9193054193171193113}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 81.7, y: -27.7}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7855310936349348646
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_CullTransparentMesh: 1
--- !u!114 &2949625200535432172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: TAKE ALL
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ee17ee87c14d246f38cbe2c8a1cec0e1, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: d3dc4728dfc654e96912baa3c913c5bf, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1922806408829654758
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9193054193171193113}
- component: {fileID: 7123977914462364542}
- component: {fileID: 2259369117757177940}
m_Layer: 5
m_Name: LeftButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9193054193171193113
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3999461166807802793}
m_Father: {fileID: 8836820119287167933}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.7999878, y: -0.000015258789}
m_SizeDelta: {x: 37.3, y: 15.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7123977914462364542
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_CullTransparentMesh: 1
--- !u!114 &2259369117757177940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8326637910f5349ca9120c04a9372282, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cefd4988834c34e50ac171d08ff79db5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,324 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &69695208276434813
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8042175405595845778}
- component: {fileID: 4791439872656588006}
- component: {fileID: 6206996845589327890}
m_Layer: 5
m_Name: ButtonBg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8042175405595845778
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8836820119287167933}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000019073486, y: -0.000015258789}
m_SizeDelta: {x: 69, y: 21}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4791439872656588006
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_CullTransparentMesh: 1
--- !u!114 &6206996845589327890
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 69695208276434813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: bdba544b5cb964318bfd8e97468fe47d, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &185028345837866954
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8836820119287167933}
m_Layer: 5
m_Name: RightOutButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8836820119287167933
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 185028345837866954}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8042175405595845778}
- {fileID: 9193054193171193113}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -26.2, y: -74.3}
m_SizeDelta: {x: 69, y: 21}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &938355235885200111
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3999461166807802793}
- component: {fileID: 7855310936349348646}
- component: {fileID: 2949625200535432172}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3999461166807802793
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9193054193171193113}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 81.7, y: -27.7}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7855310936349348646
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_CullTransparentMesh: 1
--- !u!114 &2949625200535432172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938355235885200111}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: TAKE ALL
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ee17ee87c14d246f38cbe2c8a1cec0e1, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: d3dc4728dfc654e96912baa3c913c5bf, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1922806408829654758
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9193054193171193113}
- component: {fileID: 7123977914462364542}
- component: {fileID: 2259369117757177940}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9193054193171193113
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3999461166807802793}
m_Father: {fileID: 8836820119287167933}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1.9, y: 0.24}
m_SizeDelta: {x: 37.3, y: 15.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7123977914462364542
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_CullTransparentMesh: 1
--- !u!114 &2259369117757177940
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1922806408829654758}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8326637910f5349ca9120c04a9372282, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: be3fbad1d393e4e8f8c3a9255842d202
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -242,8 +242,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: -2.4, y: 0}
m_SizeDelta: {x: 20, y: 0} m_SizeDelta: {x: 15.1, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1497580843032476982 --- !u!222 &1497580843032476982
CanvasRenderer: CanvasRenderer:
@ -316,8 +316,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 3.68, y: 0}
m_SizeDelta: {x: -20, y: 0} m_SizeDelta: {x: -12.65, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5141633037368509103 --- !u!1 &5141633037368509103
GameObject: GameObject:
@ -356,7 +356,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -39.3, y: 12.3} m_AnchoredPosition: {x: -39.3, y: 12.3}
m_SizeDelta: {x: 136.1, y: 20} m_SizeDelta: {x: 136.1, y: 15.2}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &973981562888587729 --- !u!114 &973981562888587729
MonoBehaviour: MonoBehaviour:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ using TMPro;
using Types.Items; using Types.Items;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using Utils;
namespace Components.UI namespace Components.UI
{ {
@ -17,13 +18,13 @@ namespace Components.UI
private void Awake() private void Awake()
{ {
if (nameText == null) Debug.LogError("ItemName not found"); if (nameText == null) GameLogger.LogError("ItemName not found");
if (quantityText == null) Debug.LogError("qty not found"); if (quantityText == null) GameLogger.LogError("qty not found");
if (itemIcon == null) Debug.LogError("Icon not found"); if (itemIcon == null) GameLogger.LogError("Icon not found");
itemHandler = gameObject.AddComponent<ItemHandler>(); itemHandler = gameObject.AddComponent<ItemHandler>();
if (itemHandler == null) Debug.LogError("ItemHandler not found"); if (itemHandler == null) GameLogger.LogError("ItemHandler not found");
} }
@ -49,7 +50,7 @@ namespace Components.UI
public void SetItem(GameItem newItem) public void SetItem(GameItem newItem)
{ {
// todo: Use the new Item to update the ItemName, Icon, qty // todo: Use the new Item to update the ItemName, Icon, qty
Debug.Log("Setting item, name: " + newItem.ItemName); GameLogger.Log("Setting item, name: " + newItem.ItemName);
SetName(newItem.ItemName); SetName(newItem.ItemName);
SetIcon(newItem.Icon); SetIcon(newItem.Icon);
SetQuantity(newItem.Quantity.ToString()); SetQuantity(newItem.Quantity.ToString());
@ -75,7 +76,7 @@ namespace Components.UI
public ItemComponent Copy() public ItemComponent Copy()
{ {
Debug.Log("Copying item"); GameLogger.Log("Copying item");
var newItem = gameObject.AddComponent<ItemComponent>(); var newItem = gameObject.AddComponent<ItemComponent>();
newItem.SetItem(Item); newItem.SetItem(Item);
return newItem; return newItem;

View File

@ -6,6 +6,7 @@ using Types.UI;
using Unity.VisualScripting; using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using Utils;
using ColorUtility = UnityEngine.ColorUtility; using ColorUtility = UnityEngine.ColorUtility;
namespace Components.UI namespace Components.UI
@ -23,17 +24,17 @@ namespace Components.UI
SlotHandler = gameObject.AddComponent<SlotHandler>(); SlotHandler = gameObject.AddComponent<SlotHandler>();
SlotHandler.SetSlotComponent(this); SlotHandler.SetSlotComponent(this);
if (SlotHandler == null) Debug.LogError("SlotHandler not found"); if (SlotHandler == null) GameLogger.LogError("SlotHandler not found");
} }
// public void PrintHierarchy(GameObject obj, string indent = "") // public void PrintHierarchy(GameObject obj, string indent = "")
// { // {
// // Print the name of the current GameObject // // Print the name of the current GameObject
// Debug.Log(indent + obj.name); // GameLogger.Log(indent + obj.name);
// //
// // Print the names of all components attached to the current GameObject // // Print the names of all components attached to the current GameObject
// foreach (var component in obj.GetComponents<Component>()) Debug.Log(indent + " - " + component.GetType().Name); // foreach (var component in obj.GetComponents<Component>()) GameLogger.Log(indent + " - " + component.GetType().Name);
// //
// // Recursively print the hierarchy for each child of the current GameObject // // Recursively print the hierarchy for each child of the current GameObject
// foreach (Transform child in obj.transform) PrintHierarchy(child.gameObject, indent + " "); // foreach (Transform child in obj.transform) PrintHierarchy(child.gameObject, indent + " ");
@ -42,13 +43,13 @@ namespace Components.UI
public void ListAllComponents() public void ListAllComponents()
{ {
var components = GetComponents<Component>(); var components = GetComponents<Component>();
foreach (var component in components) Debug.Log(component.GetType().Name); foreach (var component in components) GameLogger.Log(component.GetType().Name);
} }
public void ListAllComponentsInChildren() public void ListAllComponentsInChildren()
{ {
var components = GetComponentsInChildren<Component>(); var components = GetComponentsInChildren<Component>();
foreach (var component in components) Debug.Log(component.GetType().Name); foreach (var component in components) GameLogger.Log(component.GetType().Name);
} }
@ -62,7 +63,7 @@ namespace Components.UI
// we need to check the slot type of the dragged item to see if it can be placed in this slot // we need to check the slot type of the dragged item to see if it can be placed in this slot
if (draggedSlot.GetSlot().GetType() != GameSlot.GetType()) if (draggedSlot.GetSlot().GetType() != GameSlot.GetType())
{ {
Debug.Log("Cannot place item in this slot"); GameLogger.Log("Cannot place item in this slot");
return; return;
} }
@ -86,7 +87,7 @@ namespace Components.UI
// Remove any existing ItemPrefab(Clone) from this slot // Remove any existing ItemPrefab(Clone) from this slot
DeleteItem(); DeleteItem();
if (ItemPrefab == null) if (ItemPrefab == null)
// Debug.LogError("ItemPrefab not set"); // GameLogger.LogError("ItemPrefab not set");
// return; // return;
ItemPrefab = PrefabManager.Instance.GetItemPrefab(); ItemPrefab = PrefabManager.Instance.GetItemPrefab();
@ -103,7 +104,7 @@ namespace Components.UI
public ItemComponent GetItemComponent() public ItemComponent GetItemComponent()
{ {
Debug.Log("Getting item component"); GameLogger.Log("Getting item component");
return _itemComponent; return _itemComponent;
} }
@ -134,7 +135,7 @@ namespace Components.UI
if (gameSlotDetails.Item == null) DeleteItem(); if (gameSlotDetails.Item == null) DeleteItem();
// var button = transform.Find("WhiteBg").GetComponent<Button>(); // var button = transform.Find("WhiteBg").GetComponent<Button>();
Debug.Log("Slot details set, added handler."); GameLogger.Log("Slot details set, added handler.");
} }
public GameSlot GetSlot() public GameSlot GetSlot()
@ -176,13 +177,13 @@ namespace Components.UI
// Try to convert the hex color strings to Color objects // Try to convert the hex color strings to Color objects
if (!ColorUtility.TryParseHtmlString(originalColorHex, out originalColor)) if (!ColorUtility.TryParseHtmlString(originalColorHex, out originalColor))
{ {
Debug.LogError("Invalid color string: " + originalColorHex); GameLogger.LogError("Invalid color string: " + originalColorHex);
originalColor = Color.white; // default to white if the color string is invalid originalColor = Color.white; // default to white if the color string is invalid
} }
if (!ColorUtility.TryParseHtmlString(selectedColorHex, out selectedColor)) if (!ColorUtility.TryParseHtmlString(selectedColorHex, out selectedColor))
{ {
Debug.LogError("Invalid color string: " + selectedColorHex); GameLogger.LogError("Invalid color string: " + selectedColorHex);
selectedColor = Color.white; // default to white if the color string is invalid selectedColor = Color.white; // default to white if the color string is invalid
} }

View File

@ -4,6 +4,7 @@ using FishNet.Transporting.Tugboat;
using ParrelSync; using ParrelSync;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
using Utils;
public class ConnectionStarter : MonoBehaviour public class ConnectionStarter : MonoBehaviour
{ {
@ -25,7 +26,7 @@ public class ConnectionStarter : MonoBehaviour
} }
else else
{ {
Debug.LogError("Tugboat not found", gameObject); GameLogger.LogError("Tugboat not found for connection type: " + _connectionType);
return; return;
} }
#if UNITY_EDITOR #if UNITY_EDITOR

View File

@ -4,6 +4,7 @@ using FishNet.Object;
using FishNet.Transporting; using FishNet.Transporting;
using Managers; using Managers;
using UnityEngine; using UnityEngine;
using Utils;
public class GameInit : MonoBehaviour public class GameInit : MonoBehaviour
{ {
@ -24,7 +25,7 @@ public class GameInit : MonoBehaviour
InitializeNetworkManager(); InitializeNetworkManager();
_networkManager = FindObjectOfType<NetworkManager>(); _networkManager = FindObjectOfType<NetworkManager>();
if (_networkManager == null) Debug.LogError("NetworkManager not found"); if (_networkManager == null) GameLogger.LogError("NetworkManager not found");
// ensure this is singleton // ensure this is singleton
if (Instance == null) if (Instance == null)
@ -65,7 +66,7 @@ public class GameInit : MonoBehaviour
private void OnServerConnectionStateChange(ServerConnectionStateArgs args) private void OnServerConnectionStateChange(ServerConnectionStateArgs args)
{ {
Debug.Log("Server Connection State Changed " + args.ConnectionState); GameLogger.Log("Server Connection State Changed " + args.ConnectionState);
// if (args.ConnectionState == LocalConnectionState.Started) InitializeGameManager(); // if (args.ConnectionState == LocalConnectionState.Started) InitializeGameManager();
} }
@ -74,7 +75,7 @@ public class GameInit : MonoBehaviour
{ {
// InitializeGameManager(); // InitializeGameManager();
var message = "Client Connection State Changed " + args.ConnectionState; var message = "Client Connection State Changed " + args.ConnectionState;
Debug.Log(message); GameLogger.Log(message);
ShowNotification(message); ShowNotification(message);
} }
@ -106,39 +107,50 @@ public class GameInit : MonoBehaviour
// we need to make sure that the network manager is initialized first // we need to make sure that the network manager is initialized first
if (_networkManager == null) if (_networkManager == null)
{ {
Debug.LogError("NetworkManager not found"); GameLogger.LogError("NetworkManager not found");
return; return;
} }
Debug.Log("Initializing GameManager..."); GameLogger.Log("Initializing GameManager...");
if (FindObjectOfType<GameManager>() == null) if (FindObjectOfType<GameManager>() == null)
{ {
// check if gameManagerPrefab is null // check if gameManagerPrefab is null
if (gameManagerPrefab == null) if (gameManagerPrefab == null)
{ {
Debug.LogError("GameManager prefab not found"); GameLogger.LogError("GameManager prefab not found");
return; return;
} }
Debug.Log("GameManager prefab found");
GameLogger.Log("GameManager prefab found");
var gameManagerInstance = Instantiate(gameManagerPrefab); var gameManagerInstance = Instantiate(gameManagerPrefab);
_networkManager.ServerManager.Spawn(gameManagerInstance);
// check if instance was created // check if instance was created
if (gameManagerInstance == null) if (gameManagerInstance == null)
{ {
Debug.LogError("GameManager instance not found"); GameLogger.LogError("GameManager instance not found");
return; return;
} }
_networkManager.ServerManager.Spawn(gameManagerInstance); var gameManager = gameManagerInstance.GetComponent<GameManager>();
if (gameManager == null)
{
GameLogger.LogError("GameManager component not found on prefab");
Destroy(gameManagerInstance);
return;
}
gameManager.Initialize(_networkManager);
// gameManagerInstance.SetActive(true); // gameManagerInstance.SetActive(true);
} }
} }
public NetworkObject GetGameManagerPrefab() public NetworkObject GetGameManagerPrefab()
{ {
if (gameManagerPrefab == null) Debug.LogError("GameManager prefab not found"); if (gameManagerPrefab == null) GameLogger.LogError("GameManager prefab not found");
return gameManagerPrefab; return gameManagerPrefab;
} }

View File

@ -1,5 +1,6 @@
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using Utils;
// Script adds handler to GameObject that is interactable. // Script adds handler to GameObject that is interactable.
@ -11,18 +12,18 @@ public class InteractiveHandler : MonoBehaviour, IPointerDownHandler, IPointerCl
if (interactiveComponent == null) if (interactiveComponent == null)
{ {
Debug.LogError("InteractiveHandler: Interact() returned null"); GameLogger.LogError("InteractiveHandler: Interact() returned null");
return; return;
} }
// if the object is not interactable, return // if the object is not interactable, return
if (interactiveComponent.Interactable == null) Debug.LogError("InteractiveHandler: Interactable is null"); if (interactiveComponent.Interactable == null) GameLogger.LogError("InteractiveHandler: Interactable is null");
interactiveComponent.Interact(); interactiveComponent.Interact();
} }
public void OnPointerDown(PointerEventData eventData) public void OnPointerDown(PointerEventData eventData)
{ {
// Debug.Log("InteractiveHandler: OnPointerDown"); // GameLogger.Log("InteractiveHandler: OnPointerDown");
} }
} }

View File

@ -4,6 +4,7 @@ using Types.Items;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
using Utils;
// Drag Dropable // Drag Dropable
@ -36,8 +37,8 @@ namespace Handlers
{ {
// starting slot type and slot index // starting slot type and slot index
var parentSlotComponent = eventData.pointerDrag.GetComponentInParent<SlotComponent>(); var parentSlotComponent = eventData.pointerDrag.GetComponentInParent<SlotComponent>();
Debug.Log("Parent Slot Type: " + parentSlotComponent.GetSlot().GetType()); GameLogger.Log("Parent Slot Type: " + parentSlotComponent.GetSlot().GetType());
Debug.Log("Begin Drag"); GameLogger.Log("Begin Drag");
_originalPosition = _rectTransform.anchoredPosition; _originalPosition = _rectTransform.anchoredPosition;
_canvasGroup.alpha = 0.6f; _canvasGroup.alpha = 0.6f;
_canvasGroup.blocksRaycasts = false; _canvasGroup.blocksRaycasts = false;
@ -49,7 +50,7 @@ namespace Handlers
// Ensure the canvas is set // Ensure the canvas is set
if (canvas == null) if (canvas == null)
{ {
Debug.LogWarning("Canvas is null"); GameLogger.LogWarning("Canvas is null");
return; return;
} }
@ -64,7 +65,7 @@ namespace Handlers
public void OnEndDrag(PointerEventData eventData) public void OnEndDrag(PointerEventData eventData)
{ {
Debug.Log("End Drag"); GameLogger.Log("End Drag");
var parentSlotComponent = eventData.pointerDrag.GetComponentInParent<SlotComponent>(); var parentSlotComponent = eventData.pointerDrag.GetComponentInParent<SlotComponent>();
@ -92,7 +93,7 @@ namespace Handlers
public void OnPointerDown(PointerEventData eventData) public void OnPointerDown(PointerEventData eventData)
{ {
Debug.Log("OnPointerDown"); GameLogger.Log("OnPointerDown");
} }
@ -100,17 +101,17 @@ namespace Handlers
{ {
if (item == null) if (item == null)
{ {
Debug.Log("Item is null!"); GameLogger.Log("Item is null!");
Destroy(transform.gameObject); Destroy(transform.gameObject);
return; return;
} }
// Debug.Log(transform.GetChild(1)); // GameLogger.Log(transform.GetChild(1));
transform.Find("ItemName").GetComponent<TMP_Text>().text = item.ItemName; transform.Find("ItemName").GetComponent<TMP_Text>().text = item.ItemName;
transform.Find("qty").GetComponent<Text>().text = item.Quantity.ToString(); transform.Find("qty").GetComponent<Text>().text = item.Quantity.ToString();
transform.Find("Icon").GetComponent<Image>().sprite = item.Icon; transform.Find("Icon").GetComponent<Image>().sprite = item.Icon;
Debug.Log("completed processing set item"); GameLogger.Log("completed processing set item");
} }

View File

@ -4,6 +4,7 @@ using UnityEngine;
using UnityEngine.Events; using UnityEngine.Events;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.Serialization; using UnityEngine.Serialization;
using Utils;
namespace Handlers namespace Handlers
{ {
@ -38,7 +39,7 @@ namespace Handlers
public void OnDrop(PointerEventData eventData) public void OnDrop(PointerEventData eventData)
{ {
Debug.Log("Dropped on internal slot: " + _slotComponent.GetSlot().GetId()); GameLogger.Log("Dropped on internal slot: " + _slotComponent.GetSlot().GetId());
// dragged From (new item) // dragged From (new item)
var sourceSlot = eventData.pointerDrag.GetComponentInParent<SlotComponent>(); var sourceSlot = eventData.pointerDrag.GetComponentInParent<SlotComponent>();
@ -50,11 +51,11 @@ namespace Handlers
var currentSlot = GetComponent<SlotComponent>(); var currentSlot = GetComponent<SlotComponent>();
// check if valid swap // check if valid swap
Debug.Log("Source Slot Type: " + sourceSlot.GetSlot().GetType()); GameLogger.Log("Source Slot Type: " + sourceSlot.GetSlot().GetType());
Debug.Log("Destination Slot Type: " + _slotComponent.GetSlot().GetType()); GameLogger.Log("Destination Slot Type: " + _slotComponent.GetSlot().GetType());
/*if (sourceSlot.GetSlotType() != _slotComponent.GetSlotType()) /*if (sourceSlot.GetSlotType() != _slotComponent.GetSlotType())
{ {
Debug.Log("Invalid swap"); GameLogger.Log("Invalid swap");
// Reset the item to its original position // Reset the item to its original position
sourceSlotItem.GetComponent<RectTransform>().anchoredPosition = Vector2.zero; sourceSlotItem.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;
sourceSlotItem.GetComponent<RectTransform>().offsetMin = Vector2.zero; sourceSlotItem.GetComponent<RectTransform>().offsetMin = Vector2.zero;
@ -66,12 +67,12 @@ namespace Handlers
// check item type to see if it can be placed in the slot for equipment // check item type to see if it can be placed in the slot for equipment
if (currentSlot.GetSlot().GetSlotType() == SlotType.Equipment) if (currentSlot.GetSlot().GetSlotType() == SlotType.Equipment)
{ {
Debug.Log("Slot is Equipment"); GameLogger.Log("Slot is Equipment");
var sourceItemComponent = sourceSlot.GetItemComponent(); var sourceItemComponent = sourceSlot.GetItemComponent();
// check if is allowed in slot // check if is allowed in slot
if (currentSlot.IsAllowedItemTypes(sourceItemComponent.GetItem().Type) == false) if (currentSlot.IsAllowedItemTypes(sourceItemComponent.GetItem().Type) == false)
{ {
Debug.Log("Invalid swap"); GameLogger.Log("Invalid swap");
// Reset the item to its original position // Reset the item to its original position
sourceSlotItem.GetComponent<RectTransform>().anchoredPosition = Vector2.zero; sourceSlotItem.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;
sourceSlotItem.GetComponent<RectTransform>().offsetMin = Vector2.zero; sourceSlotItem.GetComponent<RectTransform>().offsetMin = Vector2.zero;
@ -95,14 +96,14 @@ namespace Handlers
if (currentSlot.GetItemComponent().GetItem().IsStackable) if (currentSlot.GetItemComponent().GetItem().IsStackable)
{ {
// if stackable add to stack // if stackable add to stack
Debug.Log("Stackable"); GameLogger.Log("Stackable");
// check if the quantity will exceed the max stack size // check if the quantity will exceed the max stack size
if (currentSlot.GetItemComponent().GetItem().Quantity + if (currentSlot.GetItemComponent().GetItem().Quantity +
sourceSlot.GetItemComponent().GetItem().Quantity > sourceSlot.GetItemComponent().GetItem().Quantity >
currentSlot.GetItemComponent().GetItem().StackSize) currentSlot.GetItemComponent().GetItem().StackSize)
{ {
Debug.Log("Stack size exceeded"); GameLogger.Log("Stack size exceeded");
// Set the quantity to the max stack size // Set the quantity to the max stack size
// get quantity to add // get quantity to add
@ -161,7 +162,7 @@ namespace Handlers
public void TriggerOnClick() public void TriggerOnClick()
{ {
onSlotClicked.Invoke(); onSlotClicked.Invoke();
Debug.Log("Clicked on slot: " + _slotComponent.GetSlot().GetId()); GameLogger.Log("Clicked on slot: " + _slotComponent.GetSlot().GetId());
//TODO: pass the click through to allow us to drag the item //TODO: pass the click through to allow us to drag the item
} }

View File

@ -1,5 +1,6 @@
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using Utils;
public class TileHandler : MonoBehaviour, IDropHandler, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler public class TileHandler : MonoBehaviour, IDropHandler, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{ {
@ -13,24 +14,24 @@ public class TileHandler : MonoBehaviour, IDropHandler, IPointerClickHandler, IP
public void OnDrop(PointerEventData eventData) public void OnDrop(PointerEventData eventData)
{ {
Debug.Log("Dropped on Tile"); GameLogger.Log("Dropped on Tile");
// what was dropped // what was dropped
// var droppedItem = eventData.pointerDrag.GetComponent<>().item; // var droppedItem = eventData.pointerDrag.GetComponent<>().item;
// Debug.Log("Dropped Item: " + droppedItem.name); // GameLogger.Log("Dropped Item: " + droppedItem.name);
} }
public void OnPointerClick(PointerEventData eventData) public void OnPointerClick(PointerEventData eventData)
{ {
Debug.Log("Tile Clicked!"); GameLogger.Log("Tile Clicked!");
} }
public void OnPointerEnter(PointerEventData eventData) public void OnPointerEnter(PointerEventData eventData)
{ {
Debug.Log("Tile Hovered!"); GameLogger.Log("Tile Hovered!");
} }
public void OnPointerExit(PointerEventData eventData) public void OnPointerExit(PointerEventData eventData)
{ {
Debug.Log("Tile Unhovered!"); GameLogger.Log("Tile Unhovered!");
} }
} }

View File

@ -1,5 +1,6 @@
using Data.ScriptableObjects.World; using Data.ScriptableObjects.World;
using UnityEngine; using UnityEngine;
using Utils;
// Crop Manager should load all of the crops similar to the item manager. // Crop Manager should load all of the crops similar to the item manager.
@ -52,10 +53,10 @@ namespace Managers
// Get all the crops from the resource folder // Get all the crops from the resource folder
public void LoadCrops() public void LoadCrops()
{ {
Debug.Log("Loading crops from Resources/Crops"); GameLogger.Log("Loading crops from Resources/Crops");
crops = Resources.LoadAll<CropInteractable>("Crops"); crops = Resources.LoadAll<CropInteractable>("Crops");
foreach (var crop in crops) Debug.Log("Loaded crop: " + crop.CropItem.ItemName); foreach (var crop in crops) GameLogger.Log("Loaded crop: " + crop.CropItem.ItemName);
} }
} }
} }

View File

@ -2,11 +2,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using Data.ScriptableObjects; using Data.ScriptableObjects;
using FishNet.Connection; using FishNet.Connection;
using FishNet.Managing;
using FishNet.Object; using FishNet.Object;
using FishNet.Object.Synchronizing; using FishNet.Object.Synchronizing;
using Types; using Types;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization; using Utils;
namespace Managers namespace Managers
{ {
@ -17,14 +18,17 @@ namespace Managers
[SerializeField] private AudioManager audioManager; [SerializeField] private AudioManager audioManager;
[SerializeField] private UIManager uiManager; [SerializeField] private UIManager uiManager;
[SerializeField] private SyncVar<bool> isPaused;
// person who's running the game, owner. // person who's running the game, owner.
[FormerlySerializedAs("playerManager")] [SerializeField] [SerializeField] private PlayerManager ownerPlayerManager;
private PlayerManager ownerPlayerManager;
[SerializeField] public ItemDatabase itemDatabase; [SerializeField] public ItemDatabase itemDatabase;
private readonly SyncVar<bool> _isPaused = new(new SyncTypeSettings
{
WritePermission = WritePermission.ServerOnly,
ReadPermission = ReadPermission.Observers
});
private readonly SyncVar<int> _syncGameSeed = new(new SyncTypeSettings private readonly SyncVar<int> _syncGameSeed = new(new SyncTypeSettings
{ {
WritePermission = WritePermission.ServerOnly, WritePermission = WritePermission.ServerOnly,
@ -55,11 +59,25 @@ namespace Managers
ReadPermission = ReadPermission.Observers ReadPermission = ReadPermission.Observers
}); });
private NetworkManager _networkManager;
public static GameManager Instance { get; set; } public static GameManager Instance { get; set; }
private void Awake() private void Awake()
{ {
Debug.Log("Starting GameManager"); if (_networkManager == null)
{
GameLogger.LogWarning("NetworkManager not found, searching for it...");
// try to find the network manager
_networkManager = FindObjectOfType<NetworkManager>();
if (_networkManager == null)
{
GameLogger.LogError("NetworkManager not found.");
return;
}
}
GameLogger.Log("Starting GameManager");
itemDatabase = Resources.Load<ItemDatabase>("GameItems/ItemDatabase"); itemDatabase = Resources.Load<ItemDatabase>("GameItems/ItemDatabase");
@ -82,6 +100,7 @@ namespace Managers
return; return;
} }
GameLogger.Log("GameManager initialized. Instance");
Instance = this; Instance = this;
} }
@ -90,19 +109,19 @@ namespace Managers
if (Instance == this) if (Instance == this)
Instance = null; Instance = null;
Debug.Log("GameManager destroyed"); GameLogger.Log("GameManager destroyed");
} }
// set default server variable value // set default server variable value
public override void OnStartServer() public override void OnStartServer()
{ {
base.OnStartServer(); base.OnStartServer();
Debug.Log("GameManager.OnStartServer() triggered"); GameLogger.Log("GameManager.OnStartServer() triggered");
if (IsServerInitialized) InitializeServerData(); if (IsServerInitialized) InitializeServerData();
// create a new instance of GameTimeManager and instantiate it on the server // create a new instance of GameTimeManager and instantiate it on the server
if (GameTimeManager.Instance == null) if (GameTimeManager.Instance == null)
{ {
Debug.Log("GameTimeManager not found, creating new one"); GameLogger.Log("GameTimeManager not found, creating new one");
gameObject.AddComponent<GameTimeManager>(); gameObject.AddComponent<GameTimeManager>();
// base.Spawn(GameTimeManager.Instance); // base.Spawn(GameTimeManager.Instance);
// spawn on server // spawn on server
@ -111,6 +130,7 @@ namespace Managers
private void InitializeServerData() private void InitializeServerData()
{ {
GameLogger.Log("GameManager.InitializeServerData()");
if (_syncGameTimeSettings.Value == null) _syncGameTimeSettings.SetInitialValues(new GameTimeSettings()); if (_syncGameTimeSettings.Value == null) _syncGameTimeSettings.SetInitialValues(new GameTimeSettings());
} }
@ -127,34 +147,34 @@ namespace Managers
private void SyncGameTimeSettingsChange(GameTimeSettings prev, GameTimeSettings next, bool asserver) private void SyncGameTimeSettingsChange(GameTimeSettings prev, GameTimeSettings next, bool asserver)
{ {
Debug.Log("SyncGameTimeSettingsChange Triggered"); GameLogger.Log("SyncGameTimeSettingsChange Triggered");
Debug.Log("Prev: " + prev.CurrentTime); // Debug.Log("Prev: " + prev.CurrentTime);
Debug.Log("Next: " + next.CurrentTime); // Debug.Log("Next: " + next.CurrentTime);
} }
private void SyncPlayersChange(SyncDictionaryOperation op, int key, GamePlayer value, bool asServer) private void SyncPlayersChange(SyncDictionaryOperation op, int key, GamePlayer value, bool asServer)
{ {
Debug.Log($"SyncPlayersChange Triggered - Operation: {op}, Key: {key}, AsServer: {asServer}"); GameLogger.Log($"SyncPlayersChange Triggered - Operation: {op}, Key: {key}, AsServer: {asServer}");
switch (op) switch (op)
{ {
case SyncDictionaryOperation.Add: case SyncDictionaryOperation.Add:
Debug.Log($"Player added - ID: {key}, Name: {value.PlayerName}"); GameLogger.Log($"Player added - ID: {key}, Name: {value.PlayerName}");
// Implement logic for when a new player is added // Implement logic for when a new player is added
OnPlayerAdded(key, value); OnPlayerAdded(key, value);
break; break;
case SyncDictionaryOperation.Remove: case SyncDictionaryOperation.Remove:
Debug.Log($"Player removed - ID: {key}"); GameLogger.Log($"Player removed - ID: {key}");
// Implement logic for when a player is removed // Implement logic for when a player is removed
OnPlayerRemoved(key); OnPlayerRemoved(key);
break; break;
case SyncDictionaryOperation.Clear: case SyncDictionaryOperation.Clear:
Debug.Log("All players cleared"); GameLogger.Log("All players cleared");
// Implement logic for when all players are cleared // Implement logic for when all players are cleared
OnAllPlayersCleared(); OnAllPlayersCleared();
break; break;
case SyncDictionaryOperation.Set: case SyncDictionaryOperation.Set:
Debug.Log($"Player updated - ID: {key}, Name: {value.PlayerName}"); GameLogger.Log($"Player updated - ID: {key}, Name: {value.PlayerName}");
// Implement logic for when a player's data is updated // Implement logic for when a player's data is updated
OnPlayerUpdated(key, value); OnPlayerUpdated(key, value);
break; break;
@ -199,35 +219,35 @@ namespace Managers
{ {
try try
{ {
Debug.Log( GameLogger.Log(
$"Attempting to register player. Connection ID: {conn?.ClientId}, Player null?: {player == null}"); $"Attempting to register player. Connection ID: {conn?.ClientId}, Player null?: {player == null}");
if (conn == null) if (conn == null)
{ {
Debug.LogError("RegisterPlayerServerRpc: NetworkConnection is null"); GameLogger.LogError("RegisterPlayerServerRpc: NetworkConnection is null");
return; return;
} }
if (player == null) if (player == null)
{ {
Debug.LogError($"RegisterPlayerServerRpc: GamePlayer is null for connection {conn.ClientId}"); GameLogger.LogError($"RegisterPlayerServerRpc: GamePlayer is null for connection {conn.ClientId}");
return; return;
} }
if (_syncPlayers.TryAdd(conn.ClientId, player)) if (_syncPlayers.TryAdd(conn.ClientId, player))
{ {
Debug.Log($"Player registered successfully: {conn.ClientId}"); GameLogger.Log($"Player registered successfully: {conn.ClientId}");
OnPlayerRegisteredObserversRpc(conn.ClientId); OnPlayerRegisteredObserversRpc(conn.ClientId);
_syncPlayers.Dirty(conn.ClientId); _syncPlayers.Dirty(conn.ClientId);
} }
else else
{ {
Debug.LogWarning($"Player with ID {conn.ClientId} is already registered"); GameLogger.LogWarning($"Player with ID {conn.ClientId} is already registered");
} }
} }
catch (Exception e) catch (Exception e)
{ {
Debug.LogError($"Error in RegisterPlayerServerRpc: {e.Message}\nStack Trace: {e.StackTrace}"); GameLogger.LogError($"Error in RegisterPlayerServerRpc: {e.Message}\nStack Trace: {e.StackTrace}");
} }
} }
@ -235,20 +255,20 @@ namespace Managers
[ObserversRpc] [ObserversRpc]
private void OnPlayerRegisteredObserversRpc(int clientId) private void OnPlayerRegisteredObserversRpc(int clientId)
{ {
Debug.Log($"OBS: Player with ID {clientId} has joined the game!"); GameLogger.Log($"OBS: Player with ID {clientId} has joined the game!");
// You can add any client-side logic here when a new player joins // You can add any client-side logic here when a new player joins
} }
public override void OnStartNetwork() public override void OnStartNetwork()
{ {
base.OnStartNetwork(); base.OnStartNetwork();
Debug.Log("Network started"); GameLogger.Log("Network started");
} }
// method to handle player connections // method to handle player connections
public override void OnStartClient() public override void OnStartClient()
{ {
Debug.Log("Client connected to server"); GameLogger.Log("Client connected to server");
base.OnStartClient(); base.OnStartClient();
if (IsServerInitialized) Instance = this; if (IsServerInitialized) Instance = this;
// Server logic for new player connections // Server logic for new player connections
@ -261,7 +281,7 @@ namespace Managers
// Debug.Log("Getting player: " + clientId); // Debug.Log("Getting player: " + clientId);
if (_syncPlayers.Count == 0) if (_syncPlayers.Count == 0)
{ {
Debug.LogWarning("Players not yet initialized"); GameLogger.LogWarning("Players not yet initialized");
return null; return null;
} }
@ -303,7 +323,7 @@ namespace Managers
// client ot server comm? i.e client is telling the server to run this code // client ot server comm? i.e client is telling the server to run this code
public void EndGameServerRpc() public void EndGameServerRpc()
{ {
Debug.Log("ServerRPC Game Over"); GameLogger.Log("ServerRPC Game Over");
UIManager.ShowGameOverScreen(true); UIManager.ShowGameOverScreen(true);
// AudioManager.PlayMusic("GameOverTheme"); // AudioManager.PlayMusic("GameOverTheme");
} }
@ -312,7 +332,7 @@ namespace Managers
// server to client communication i.e server is telling the client to run this code // server to client communication i.e server is telling the client to run this code
public void EndGameObserversRpc() public void EndGameObserversRpc()
{ {
Debug.Log("ObserverRPC Game Over"); GameLogger.Log("ObserverRPC Game Over");
UIManager.ShowGameOverScreen(true); UIManager.ShowGameOverScreen(true);
} }
@ -327,8 +347,8 @@ namespace Managers
public GameTimeSettings GetTimeSettings() public GameTimeSettings GetTimeSettings()
{ {
Debug.Log("GameManager.GetTimeSettings()"); GameLogger.Log("GameManager.GetTimeSettings()");
Debug.Log("GameTimeSettings: " + _syncGameTimeSettings.Value); GameLogger.Log("GameTimeSettings: " + _syncGameTimeSettings.Value);
return _syncGameTimeSettings.Value; return _syncGameTimeSettings.Value;
} }
@ -360,7 +380,7 @@ namespace Managers
[Server] [Server]
private void UpdatePlayer(int playerId, GamePlayer player) private void UpdatePlayer(int playerId, GamePlayer player)
{ {
Debug.Log("Updating player: " + playerId); GameLogger.Log("Updating player: " + playerId);
_syncPlayers[playerId] = player; _syncPlayers[playerId] = player;
_syncPlayers.Dirty(playerId); _syncPlayers.Dirty(playerId);
} }
@ -394,8 +414,8 @@ namespace Managers
[ServerRpc(RequireOwnership = false)] [ServerRpc(RequireOwnership = false)]
public void RequestUpdateTimeSettingsServerRpc(GameTimeSettings timeSettings) public void RequestUpdateTimeSettingsServerRpc(GameTimeSettings timeSettings)
{ {
Debug.Log("RequestUpdateTimeSettingsServerRpc Triggered"); GameLogger.Log("RequestUpdateTimeSettingsServerRpc Triggered");
Debug.Log("CurrentTime: " + timeSettings.CurrentTime); // Debug.Log("CurrentTime: " + timeSettings.CurrentTime);
// You might want to add validation here // You might want to add validation here
UpdateTimeSettings(timeSettings); UpdateTimeSettings(timeSettings);
} }
@ -418,7 +438,7 @@ namespace Managers
{ {
if (!IsServerInitialized && !IsClientInitialized) if (!IsServerInitialized && !IsClientInitialized)
{ {
Debug.LogError("GameManager not initialized"); GameLogger.LogError("GameManager not initialized");
return null; return null;
} }
@ -426,23 +446,36 @@ namespace Managers
if (_syncPlayers.TryGetValue(clientId, out var player)) if (_syncPlayers.TryGetValue(clientId, out var player))
{ {
Debug.Log("Found player for clientId: " + clientId); GameLogger.Log("Found player for clientId: " + clientId);
Debug.Log("Player name: " + player.PlayerName); GameLogger.Log("Player name: " + player.PlayerName);
return player; return player;
} }
Debug.LogError("Player not found for clientId: " + clientId); GameLogger.LogError("Player not found for clientId: " + clientId);
return null; return null;
} }
public void PauseGame() public void PauseGame()
{ {
isPaused.Value = true; _isPaused.Value = true;
} }
public void ResumeGame() public void ResumeGame()
{ {
isPaused.Value = false; _isPaused.Value = false;
}
public void TogglePause()
{
if (_isPaused.Value)
ResumeGame();
else
PauseGame();
}
public void Initialize(NetworkManager networkManager)
{
_networkManager = networkManager;
} }
} }
} }

View File

@ -4,6 +4,7 @@ using FishNet.Object;
using FishNet.Object.Synchronizing; using FishNet.Object.Synchronizing;
using Types; using Types;
using UnityEngine; using UnityEngine;
using Utils;
// possible future additions // possible future additions
// weather sys // weather sys
@ -86,7 +87,7 @@ namespace Managers
if (isPaused) return; if (isPaused) return;
if (GameManager.Instance == null) if (GameManager.Instance == null)
Debug.LogError("GameManager.Instance is null in GameTimeManager.Update()"); GameLogger.LogError("GameManager.Instance is null in GameTimeManager.Update()");
// var timeSettings = GameManager.Instance.GetTimeSettings(); // var timeSettings = GameManager.Instance.GetTimeSettings();
@ -103,14 +104,14 @@ namespace Managers
{ {
if (GameManager.Instance == null) if (GameManager.Instance == null)
{ {
Debug.LogError("GameManager.Instance is null in GameTimeManager.InitializeServerData()"); GameLogger.LogError("GameManager.Instance is null in GameTimeManager.InitializeServerData()");
return; return;
} }
var timeSettings = GameManager.Instance.GetTimeSettings(); var timeSettings = GameManager.Instance.GetTimeSettings();
if (timeSettings == null) if (timeSettings == null)
{ {
Debug.LogError("TimeSettings is null in GameTimeManager.InitializeServerData()"); GameLogger.LogError("TimeSettings is null in GameTimeManager.InitializeServerData()");
return; return;
} }
@ -138,11 +139,11 @@ namespace Managers
{ {
base.OnStartServer(); base.OnStartServer();
/*// StartCoroutine(ServerDayNightCycleCoroutine()); /*// StartCoroutine(ServerDayNightCycleCoroutine());
Debug.Log("GameTimeManager.OnStartServer() triggered"); GameLogger.Log("GameTimeManager.OnStartServer() triggered");
*/ */
if (IsServerInitialized) if (IsServerInitialized)
{ {
Debug.Log("GameTimeManager.OnStartServer() triggered, initializing server data"); GameLogger.Log("GameTimeManager.OnStartServer() triggered, initializing server data");
InitializeServerData(); InitializeServerData();
} }
} }
@ -188,7 +189,7 @@ namespace Managers
{ {
if (GameManager.Instance == null) if (GameManager.Instance == null)
{ {
Debug.LogError("GameManager not found"); GameLogger.LogError("GameManager not found");
return new GameTime(); return new GameTime();
} }
@ -213,17 +214,17 @@ namespace Managers
{ {
if (GameManager.Instance == null) if (GameManager.Instance == null)
{ {
Debug.LogError("GameManager not found"); GameLogger.LogError("GameManager not found");
return "00:00"; return "00:00";
} }
var timeSettings = GameManager.Instance.GetTimeSettings(); var timeSettings = GameManager.Instance.GetTimeSettings();
Debug.Log("Current settings start time: " + timeSettings.DayStartTimeInHours); GameLogger.Log("Current settings start time: " + timeSettings.DayStartTimeInHours);
Debug.Log("Current settings day length: " + timeSettings.DayLengthInMinutes); GameLogger.Log("Current settings day length: " + timeSettings.DayLengthInMinutes);
if (timeSettings == null) return "00:00"; if (timeSettings == null) return "00:00";
// Calculate the current hour and minute based on the time of day // Calculate the current hour and minute based on the time of day
var gameTime = GetGameTime(); var gameTime = GetGameTime();
Debug.Log("Current time: " + gameTime.hour + ":" + gameTime.minute); GameLogger.Log("Current time: " + gameTime.hour + ":" + gameTime.minute);
var hours = gameTime.hour; var hours = gameTime.hour;
var minutes = gameTime.minute; var minutes = gameTime.minute;
@ -231,7 +232,7 @@ namespace Managers
var hours12 = hours % 12; var hours12 = hours % 12;
if (hours12 == 0) hours12 = 12; if (hours12 == 0) hours12 = 12;
var amPm = hours < 12 ? "AM" : "PM"; var amPm = hours < 12 ? "AM" : "PM";
Debug.Log("Hours: " + hours + " AM/PM: " + amPm); GameLogger.Log("Hours: " + hours + " AM/PM: " + amPm);
return $"{(int)hours12:D2}:{(int)minutes:D2} {amPm}"; return $"{(int)hours12:D2}:{(int)minutes:D2} {amPm}";
} }
@ -245,13 +246,13 @@ namespace Managers
public void Pause() public void Pause()
{ {
Debug.Log("GameTimeManager.Pause()"); GameLogger.Log("GameTimeManager.Pause()");
isPaused = true; isPaused = true;
} }
public void Resume() public void Resume()
{ {
Debug.Log("GameTimeManager.Resume()"); GameLogger.Log("GameTimeManager.Resume()");
isPaused = false; isPaused = false;
} }
@ -265,7 +266,8 @@ namespace Managers
if (isPaused) yield return new WaitForSeconds(0.5f); if (isPaused) yield return new WaitForSeconds(0.5f);
if (GameManager.Instance == null) if (GameManager.Instance == null)
{ {
Debug.LogWarning("GameManager.Instance is null in GameTimeManager.ServerDayNightCycleCoroutine()"); GameLogger.LogWarning(
"GameManager.Instance is null in GameTimeManager.ServerDayNightCycleCoroutine()");
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
continue; continue;
} }
@ -273,7 +275,7 @@ namespace Managers
var timeSettings = GameManager.Instance.GetTimeSettings(); var timeSettings = GameManager.Instance.GetTimeSettings();
if (timeSettings == null) if (timeSettings == null)
{ {
Debug.LogWarning("TimeSettings is null in GameTimeManager.ServerDayNightCycleCoroutine()"); GameLogger.LogWarning("TimeSettings is null in GameTimeManager.ServerDayNightCycleCoroutine()");
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
continue; continue;
} }
@ -293,7 +295,7 @@ namespace Managers
if (timeSettings.CurrentTime >= timeSettings.DayLengthInMinutes * 60) if (timeSettings.CurrentTime >= timeSettings.DayLengthInMinutes * 60)
{ {
timeSettings.DaysPassed++; timeSettings.DaysPassed++;
Debug.Log("Day " + timeSettings.DaysPassed + " has passed"); GameLogger.Log("Day " + timeSettings.DaysPassed + " has passed");
timeSettings.CurrentTime = 0; timeSettings.CurrentTime = 0;
isFirstDay = false; isFirstDay = false;
@ -302,7 +304,7 @@ namespace Managers
var newSeason = GetCurrentSeason(timeSettings.DaysPassed); var newSeason = GetCurrentSeason(timeSettings.DaysPassed);
if (newSeason != timeSettings.Season) if (newSeason != timeSettings.Season)
{ {
Debug.Log("Season changed from " + timeSettings.Season + " to " + newSeason); GameLogger.Log("Season changed from " + timeSettings.Season + " to " + newSeason);
timeSettings.Season = newSeason; timeSettings.Season = newSeason;
OnSeasonChange?.Invoke(); OnSeasonChange?.Invoke();
} }

View File

@ -2,6 +2,7 @@
using Data.ScriptableObjects; using Data.ScriptableObjects;
using Types.Map; using Types.Map;
using UnityEngine; using UnityEngine;
using Utils;
namespace Managers namespace Managers
{ {
@ -30,7 +31,7 @@ namespace Managers
public TileGrid CreateGridForMap(string mapName, Vector2Int gridSize) public TileGrid CreateGridForMap(string mapName, Vector2Int gridSize)
{ {
_grids[mapName] = new TileGrid(gridSize); _grids[mapName] = new TileGrid(gridSize);
Debug.Log("New Grid created for map: " + mapName); GameLogger.Log("New Grid created for map: " + mapName);
// move grid to correct position // move grid to correct position
return _grids[mapName]; return _grids[mapName];
} }
@ -39,7 +40,7 @@ namespace Managers
{ {
if (_grids.TryGetValue(mapSo.sceneName, out var grid)) return grid; if (_grids.TryGetValue(mapSo.sceneName, out var grid)) return grid;
Debug.Log($"No grid found for map {mapSo.sceneName}"); GameLogger.Log($"No grid found for map {mapSo.sceneName}");
// create a new grid with default size // create a new grid with default size
return CreateGridForMap(mapSo.sceneName, mapSo.gridSize); return CreateGridForMap(mapSo.sceneName, mapSo.gridSize);
} }
@ -47,19 +48,19 @@ namespace Managers
public void AssignGridToMap(MapSo mapSo, TileGrid grid) public void AssignGridToMap(MapSo mapSo, TileGrid grid)
{ {
// Load the grid for the map // Load the grid for the map
Debug.Log("Loading grid for map: " + mapSo.sceneName); GameLogger.Log("Loading grid for map: " + mapSo.sceneName);
_grids[mapSo.sceneName] = grid; _grids[mapSo.sceneName] = grid;
} }
// Update your other methods to take a mapName parameter and operate on the correct grid // Update your other methods to take a mapName parameter and operate on the correct grid
public void LoadGrid(string currentMapSceneName, Vector3 gridPosition) public void LoadGrid(string currentMapSceneName, Vector3 gridPosition)
{ {
Debug.Log("GRID: Loading grid: " + currentMapSceneName); GameLogger.Log("GRID: Loading grid: " + currentMapSceneName);
if (_grids.TryGetValue(currentMapSceneName, out var grid)) if (_grids.TryGetValue(currentMapSceneName, out var grid))
{ {
Debug.Log("GRID: Grid found for map: " + currentMapSceneName); GameLogger.Log("GRID: Grid found for map: " + currentMapSceneName);
Debug.Log("GRID: Size: " + grid.GetSize().x + ", " + grid.GetSize().y); GameLogger.Log("GRID: Size: " + grid.GetSize().x + ", " + grid.GetSize().y);
// Create a parent object for the grid // Create a parent object for the grid
_gridParent = new GameObject("Grid"); _gridParent = new GameObject("Grid");
@ -82,13 +83,13 @@ namespace Managers
// set interactive as child of tile // set interactive as child of tile
interactable.transform.SetParent(tile.transform); interactable.transform.SetParent(tile.transform);
interactable.transform.position = tile.transform.position; interactable.transform.position = tile.transform.position;
Debug.Log("GRID: Created tile at position: " + x + ", " + y); GameLogger.Log("GRID: Created tile at position: " + x + ", " + y);
} }
// set tile as parent to interactable game object // set tile as parent to interactable game object
/*// Load the tile at position (x, y) /*// Load the tile at position (x, y)
Debug.Log("GRID: Loading tile at position: " + x + ", " + y); GameLogger.Log("GRID: Loading tile at position: " + x + ", " + y);
var tile = ScriptableObject.CreateInstance<Tile>(); var tile = ScriptableObject.CreateInstance<Tile>();
tile.Initialize(new Vector2Int(x, y)); tile.Initialize(new Vector2Int(x, y));
@ -122,25 +123,25 @@ namespace Managers
interactableComponent.transform.SetParent(tileObject.transform); interactableComponent.transform.SetParent(tileObject.transform);
interactableComponent.GetComponent<SpriteRenderer>().sprite = interactable.growthSprites[0]; interactableComponent.GetComponent<SpriteRenderer>().sprite = interactable.growthSprites[0];
// move interatable sprite child objectsuch that the bottom of the sprite is at the bottom of the tile // move interatable sprite child objectsuch that the bottom of the sprite is at the bottom of the tile
Debug.Log("GRID: Setting Interactable sprite position to bottom of tile"); GameLogger.Log("GRID: Setting Interactable sprite position to bottom of tile");
var spriteRenderer = interactableComponent.GetComponent<SpriteRenderer>(); var spriteRenderer = interactableComponent.GetComponent<SpriteRenderer>();
var spriteHeight = spriteRenderer.bounds.size.y; var spriteHeight = spriteRenderer.bounds.size.y;
spriteRenderer.transform.position = new Vector3(tileObject.transform.position.x, spriteRenderer.transform.position = new Vector3(tileObject.transform.position.x,
tileObject.transform.position.y + spriteHeight / 2 - 0.5f, 0);*/ tileObject.transform.position.y + spriteHeight / 2 - 0.5f, 0);*/
// } // }
Debug.Log("GRID: Setting grid parent position to: " + gridPosition); GameLogger.Log("GRID: Setting grid parent position to: " + gridPosition);
_gridParent.transform.position = gridPosition; _gridParent.transform.position = gridPosition;
} }
else else
{ {
Debug.LogError("GRID: No grid found for map: " + currentMapSceneName); GameLogger.LogError("GRID: No grid found for map: " + currentMapSceneName);
} }
} }
public GameObject CreateTile(Vector2Int position) public GameObject CreateTile(Vector2Int position)
{ {
Debug.Log("GRID: Creating tile at position: " + position); GameLogger.Log("GRID: Creating tile at position: " + position);
var tilePrefab = PrefabManager.Instance.GetTilePrefab(); var tilePrefab = PrefabManager.Instance.GetTilePrefab();
var tileObject = Instantiate(tilePrefab, new Vector3(position.x * tileSize, -position.y * tileSize, 0), var tileObject = Instantiate(tilePrefab, new Vector3(position.x * tileSize, -position.y * tileSize, 0),

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Utils;
public class HotkeyManager : MonoBehaviour public class HotkeyManager : MonoBehaviour
{ {
@ -37,7 +38,7 @@ public class HotkeyManager : MonoBehaviour
// Method to register a new hotkey // Method to register a new hotkey
public void RegisterHotkey(string actionName, KeyCode key, Action action) public void RegisterHotkey(string actionName, KeyCode key, Action action)
{ {
Debug.Log("Registering Hot Key: " + actionName); GameLogger.Log("Registering Hot Key: " + actionName);
if (actionKeys.ContainsKey(actionName)) UnregisterHotkey(actionKeys[actionName], action); if (actionKeys.ContainsKey(actionName)) UnregisterHotkey(actionKeys[actionName], action);
actionKeys[actionName] = key; actionKeys[actionName] = key;

View File

@ -1,6 +1,7 @@
using System.Linq; using System.Linq;
using Data.ScriptableObjects.World; using Data.ScriptableObjects.World;
using UnityEngine; using UnityEngine;
using Utils;
public class InteractableManager : MonoBehaviour public class InteractableManager : MonoBehaviour
{ {
@ -44,7 +45,7 @@ public class InteractableManager : MonoBehaviour
{ {
if (interactables.Length == 0) if (interactables.Length == 0)
{ {
Debug.LogWarning("No interactable found"); GameLogger.LogWarning("No interactable found");
return null; return null;
} }
@ -55,18 +56,18 @@ public class InteractableManager : MonoBehaviour
{ {
if (interactables.Length == 0) if (interactables.Length == 0)
{ {
Debug.LogWarning("No interactable found"); GameLogger.LogWarning("No interactable found");
return null; return null;
} }
Debug.Log("Length of interactables: " + interactables.Length); GameLogger.Log("Length of interactables: " + interactables.Length);
var cropInteractables = interactables.OfType<CropInteractable>().ToArray(); var cropInteractables = interactables.OfType<CropInteractable>().ToArray();
Debug.Log("Length of cropInteractables: " + cropInteractables.Length); GameLogger.Log("Length of cropInteractables: " + cropInteractables.Length);
var randomRange = Random.Range(0, cropInteractables.Length - 1); var randomRange = Random.Range(0, cropInteractables.Length - 1);
Debug.Log("Random Chosen in range:" + randomRange); GameLogger.Log("Random Chosen in range:" + randomRange);
var cropInteractable = cropInteractables[randomRange]; var cropInteractable = cropInteractables[randomRange];
Debug.Log("Random Crop Interactable: " + cropInteractable.ObjectName); GameLogger.Log("Random Crop Interactable: " + cropInteractable.ObjectName);
return Instantiate(cropInteractables[randomRange]); return Instantiate(cropInteractables[randomRange]);
} }
@ -74,7 +75,7 @@ public class InteractableManager : MonoBehaviour
{ {
if (interactables.Length == 0) if (interactables.Length == 0)
{ {
Debug.LogWarning("No interactable found"); GameLogger.LogWarning("No interactable found");
return null; return null;
} }
@ -84,11 +85,11 @@ public class InteractableManager : MonoBehaviour
public void LoadInteractable() public void LoadInteractable()
{ {
Debug.Log("Loading interactable from Resources/Interactable"); GameLogger.Log("Loading interactable from Resources/Interactable");
interactables = Resources.LoadAll<Interactable>("Interactables"); interactables = Resources.LoadAll<Interactable>("Interactables");
// interactables = interactables.Concat(Resources.LoadAll<TreeInteractable>("Interactables")).ToArray(); // interactables = interactables.Concat(Resources.LoadAll<TreeInteractable>("Interactables")).ToArray();
// interactables = interactables.Concat(Resources.LoadAll<RockInteractable>("Interactables")).ToArray(); // interactables = interactables.Concat(Resources.LoadAll<RockInteractable>("Interactables")).ToArray();
// interactables = interactables.Concat(Resources.LoadAll<BoxInteractable>("Interactables")).ToArray(); // interactables = interactables.Concat(Resources.LoadAll<BoxInteractable>("Interactables")).ToArray();
/*foreach (var interactable in interactables) Debug.Log("Loaded interactable: " + interactable.id);*/ /*foreach (var interactable in interactables) GameLogger.Log("Loaded interactable: " + interactable.id);*/
} }
} }

View File

@ -3,7 +3,7 @@ using FishNet.Object;
using Types; using Types;
using Types.Items; using Types.Items;
using Types.UI; using Types.UI;
using UnityEngine; using Utils;
namespace Managers.Item namespace Managers.Item
{ {
@ -18,7 +18,7 @@ namespace Managers.Item
private void Start() private void Start()
{ {
Debug.Log("EquipmentManager Start"); GameLogger.Log("EquipmentManager Start");
} }
public GameItem GetItemFromSlot(int slotId) public GameItem GetItemFromSlot(int slotId)
@ -31,7 +31,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.Item = null; slot.Item = null;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
} }
public void RemoveSlot(int slotId) public void RemoveSlot(int slotId)
@ -62,12 +62,12 @@ namespace Managers.Item
if (slot.IsEmpty()) if (slot.IsEmpty())
{ {
slot.Item = item; slot.Item = item;
Debug.Log("Added item to slot: " + slot.Position + " / " + item.ItemName + " / " + GameLogger.Log("Added item to slot: " + slot.Position + " / " + item.ItemName + " / " +
item.Quantity); item.Quantity);
return; return;
} }
Debug.LogWarning("No empty slots available to add item: " + item.ItemName); GameLogger.LogWarning("No empty slots available to add item: " + item.ItemName);
} }
// [ServerRpc] // [ServerRpc]
@ -76,7 +76,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.Item = item; slot.Item = item;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
} }
/*[ServerRpc] /*[ServerRpc]
@ -88,11 +88,11 @@ namespace Managers.Item
if (slot.IsEmpty()) if (slot.IsEmpty())
{ {
slot.item = item; slot.item = item;
Debug.Log("Added item to slot: " + slot.position + " / " + item.itemName + " / " + item.quantity); GameLogger.Log("Added item to slot: " + slot.position + " / " + item.itemName + " / " + item.quantity);
return; return;
} }
Debug.LogWarning("No empty slots available to add item: " + item.itemName); GameLogger.LogWarning("No empty slots available to add item: " + item.itemName);
}*/ }*/
/*public void AddItemToSlot(SyncGameItem item, int slotId) /*public void AddItemToSlot(SyncGameItem item, int slotId)
@ -100,7 +100,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.item = item; slot.item = item;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
}*/ }*/
@ -110,11 +110,11 @@ namespace Managers.Item
if (slot.item == item) if (slot.item == item)
{ {
slot.item = null; slot.item = null;
Debug.Log("Removed item from slot: " + item.itemName); GameLogger.Log("Removed item from slot: " + item.itemName);
return; return;
} }
Debug.LogWarning("Item not found in any slot: " + item.itemName); GameLogger.LogWarning("Item not found in any slot: " + item.itemName);
}*/ }*/
public void SetItemInSlot(int slotId, GameItem item) public void SetItemInSlot(int slotId, GameItem item)
@ -123,7 +123,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.Item = item; slot.Item = item;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
} }
public void SetActiveSlot(int slotId) public void SetActiveSlot(int slotId)
@ -134,9 +134,9 @@ namespace Managers.Item
public void Initialize(GamePlayer playerData) public void Initialize(GamePlayer playerData)
{ {
Debug.Log("Initializing EquipmentManager"); GameLogger.Log("Initializing EquipmentManager");
LoadSlots(playerData.EquipmentSlots); LoadSlots(playerData.EquipmentSlots);
Debug.Log("Completed Initialized items in EquipmentManager"); GameLogger.Log("Completed Initialized items in EquipmentManager");
} }
public void LoadSlots(Dictionary<int, GameSlot> slots) public void LoadSlots(Dictionary<int, GameSlot> slots)

View File

@ -4,7 +4,7 @@ using FishNet.Object;
using Types; using Types;
using Types.Items; using Types.Items;
using Types.UI; using Types.UI;
using UnityEngine; using Utils;
namespace Managers.Item namespace Managers.Item
{ {
@ -15,7 +15,7 @@ namespace Managers.Item
private void Start() private void Start()
{ {
Debug.Log("InventoryManager Start"); GameLogger.Log("InventoryManager Start");
} }
public GameSlot GetSlot(int slotId) public GameSlot GetSlot(int slotId)
@ -33,7 +33,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.Item = null; slot.Item = null;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
} }
@ -43,12 +43,12 @@ namespace Managers.Item
if (slot.IsEmpty()) if (slot.IsEmpty())
{ {
slot.item = item.GameItem; slot.item = item.GameItem;
Debug.Log("Added item to slot: " + slot.position + " / " + item.GameItem.itemName + " / " + GameLogger.Log("Added item to slot: " + slot.position + " / " + item.GameItem.itemName + " / " +
item.GameItem.quantity); item.GameItem.quantity);
return; return;
} }
Debug.LogWarning("No empty slots available to add item: " + item.GameItem.itemName);*/ GameLogger.LogWarning("No empty slots available to add item: " + item.GameItem.itemName);*/
} }
public void AddItemToSlot(GameItem item, int slotId) public void AddItemToSlot(GameItem item, int slotId)
@ -85,7 +85,7 @@ namespace Managers.Item
/*if (Slots.TryGetValue(slotId, out var slot)) /*if (Slots.TryGetValue(slotId, out var slot))
slot.item = item.GameItem; slot.item = item.GameItem;
else else
Debug.LogWarning("Slot not found: " + slotId);#1# GameLogger.LogWarning("Slot not found: " + slotId);#1#
} }
[ServerRpc] [ServerRpc]
@ -95,11 +95,11 @@ namespace Managers.Item
if (slot.item == item.GameItem) if (slot.item == item.GameItem)
{ {
slot.item = null; slot.item = null;
Debug.Log("Removed item from slot: " + item.GameItem.itemName); GameLogger.Log("Removed item from slot: " + item.GameItem.itemName);
return; return;
} }
Debug.LogWarning("Item not found in any slot: " + item.GameItem.itemName);#1# GameLogger.LogWarning("Item not found in any slot: " + item.GameItem.itemName);#1#
}*/ }*/
public void RemoveItemInSlot(int slotId) public void RemoveItemInSlot(int slotId)
@ -107,7 +107,7 @@ namespace Managers.Item
if (Slots.TryGetValue(slotId, out var slot)) if (Slots.TryGetValue(slotId, out var slot))
slot.Item = null; slot.Item = null;
else else
Debug.LogWarning("Slot not found: " + slotId); GameLogger.LogWarning("Slot not found: " + slotId);
} }
/*public void Initialize(PlayerData playerData) /*public void Initialize(PlayerData playerData)
@ -122,7 +122,7 @@ namespace Managers.Item
AddSlot(slot); AddSlot(slot);
}*/ }*/
// Debug.Log("Completed Initialized items in InventoryManager"); // GameLogger.Log("Completed Initialized items in InventoryManager");
public void Initialize(GamePlayer getGamePlayerData) public void Initialize(GamePlayer getGamePlayerData)
{ {
// //

View File

@ -7,6 +7,7 @@ using FishNet.Managing.Scened;
using Types.Map; using Types.Map;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization; using UnityEngine.Serialization;
using Utils;
// using UnityEngine.SceneManagement as UnitySceneManager; // for SceneManager // using UnityEngine.SceneManagement as UnitySceneManager; // for SceneManager
using UnitySceneManager = UnityEngine.SceneManagement.SceneManager; using UnitySceneManager = UnityEngine.SceneManagement.SceneManager;
@ -58,7 +59,7 @@ namespace Managers
public IEnumerator LoadMap(MapSo newMapSo) public IEnumerator LoadMap(MapSo newMapSo)
{ {
Debug.Log("Loading map: " + newMapSo.name); GameLogger.Log("Loading map: " + newMapSo.name);
// Unload the current map, if any // Unload the current map, if any
if (currentMapSo != null) UnloadMap(currentMapSo); if (currentMapSo != null) UnloadMap(currentMapSo);
@ -90,10 +91,10 @@ namespace Managers
// var asyncLoad = SceneManager.LoadSceneAsync(currentMap.sceneName); // var asyncLoad = SceneManager.LoadSceneAsync(currentMap.sceneName);
// var sceneProcessor = _networkManager.SceneManager.GetSceneProcessor(); // var sceneProcessor = _networkManager.SceneManager.GetSceneProcessor();
// var asyncLoad = UnitySceneManager.LoadSceneAsync(currentMap.sceneName); // var asyncLoad = UnitySceneManager.LoadSceneAsync(currentMap.sceneName);
// Debug.Log("Loading scene: " + asyncLoad.progress); // GameLogger.Log("Loading scene: " + asyncLoad.progress);
/*while (asyncLoad is { isDone: false }) /*while (asyncLoad is { isDone: false })
{ {
Debug.Log("Loading scene: " + asyncLoad.progress); GameLogger.Log("Loading scene: " + asyncLoad.progress);
yield return null; yield return null;
}*/ }*/
@ -105,8 +106,8 @@ namespace Managers
public void OnLoadEnd(SceneLoadEndEventArgs data) public void OnLoadEnd(SceneLoadEndEventArgs data)
{ {
Debug.Log("Scene loaded: " + data.LoadedScenes.Length); GameLogger.Log("Scene loaded: " + data.LoadedScenes.Length);
/*Debug.Log("Scene loaded: " + data.LoadedScenes[0].name);*/ /*GameLogger.Log("Scene loaded: " + data.LoadedScenes[0].name);*/
// GridManager.Instance.LoadGrid(currentMap.sceneName, currentMap.gridPosition); // GridManager.Instance.LoadGrid(currentMap.sceneName, currentMap.gridPosition);
} }
@ -114,12 +115,12 @@ namespace Managers
public TileGrid GetGridForMap(MapSo mapSo) public TileGrid GetGridForMap(MapSo mapSo)
{ {
// Get the grid for the map // Get the grid for the map
Debug.Log("GRID: Getting grid for map: " + mapSo.name); GameLogger.Log("GRID: Getting grid for map: " + mapSo.name);
// Check if GridManager is null // Check if GridManager is null
if (GridManager.Instance == null) if (GridManager.Instance == null)
{ {
Debug.LogWarning("GRID: No GridManager found"); GameLogger.LogWarning("GRID: No GridManager found");
return null; return null;
} }
@ -129,16 +130,16 @@ namespace Managers
public TileGrid GetGridForCurrentMap() public TileGrid GetGridForCurrentMap()
{ {
// Get the grid for the current map // Get the grid for the current map
Debug.Log("GRID: Getting grid for current map: " + currentMapSo.name); GameLogger.Log("GRID: Getting grid for current map: " + currentMapSo.name);
if (currentMapSo == null) if (currentMapSo == null)
{ {
Debug.LogWarning("GRID: No current map found"); GameLogger.LogWarning("GRID: No current map found");
return null; return null;
} }
if (GridManager.Instance == null) if (GridManager.Instance == null)
{ {
Debug.LogWarning("GRID: No GridManager found"); GameLogger.LogWarning("GRID: No GridManager found");
return null; return null;
} }
@ -148,7 +149,7 @@ namespace Managers
public void UnloadMap(MapSo mapSo) public void UnloadMap(MapSo mapSo)
{ {
// Clean up the map (e.g., destroy all items and crops) // Clean up the map (e.g., destroy all items and crops)
Debug.Log("Unloading map: " + mapSo.name); GameLogger.Log("Unloading map: " + mapSo.name);
try try
{ {
// _networkManager.SceneManager.UnloadConnectionScenes(_networkManager.ClientManager.Connection, // _networkManager.SceneManager.UnloadConnectionScenes(_networkManager.ClientManager.Connection,
@ -157,7 +158,7 @@ namespace Managers
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Log("Error unloading map: " + e.Message); GameLogger.Log("Error unloading map: " + e.Message);
} }
} }
@ -170,7 +171,7 @@ namespace Managers
public void GetMap(string mapName) public void GetMap(string mapName)
{ {
Debug.Log("Getting map: " + mapName); GameLogger.Log("Getting map: " + mapName);
if (_maps.TryGetValue(mapName, out var map)) if (_maps.TryGetValue(mapName, out var map))
{ {
var loadMap = LoadMap(map); var loadMap = LoadMap(map);
@ -178,29 +179,29 @@ namespace Managers
} }
else else
{ {
Debug.LogWarning("Map not found: " + mapName); GameLogger.LogWarning("Map not found: " + mapName);
} }
} }
public void Initialize() public void Initialize()
{ {
Debug.Log("Initializing items from Resources/Maps"); GameLogger.Log("Initializing items from Resources/Maps");
var items = Resources.LoadAll<MapSo>("Maps"); var items = Resources.LoadAll<MapSo>("Maps");
foreach (var item in items) foreach (var item in items)
{ {
Debug.Log("Adding map: " + item.name); GameLogger.Log("Adding map: " + item.name);
AddMap(item); AddMap(item);
} }
if (currentMapSo == null) if (currentMapSo == null)
{ {
Debug.LogWarning("No current map found"); GameLogger.LogWarning("No current map found");
} }
else else
{ {
Debug.Log("Loading current map: " + currentMapSo.name); GameLogger.Log("Loading current map: " + currentMapSo.name);
var loadMap = LoadMap(currentMapSo); var loadMap = LoadMap(currentMapSo);
StartCoroutine(loadMap); StartCoroutine(loadMap);
} }

View File

@ -4,18 +4,21 @@ using UnityEngine;
// using UnityEngine.UI; // using UnityEngine.UI;
public class NetworkManagerUI : MonoBehaviour namespace Managers
{ {
// [SerializeField] private Button serverBtn; public class NetworkManagerUI : MonoBehaviour
// [SerializeField] private Button hostBtn; {
// [SerializeField] private Button clientBtn; // [SerializeField] private Button serverBtn;
// // [SerializeField] private Button hostBtn;
// public void Awake() // [SerializeField] private Button clientBtn;
// { //
// serverBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartServer(); }); // public void Awake()
// // {
// hostBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartHost(); }); // serverBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartServer(); });
// //
// clientBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartClient(); }); // hostBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartHost(); });
// } //
// clientBtn.onClick.AddListener(() => { NetworkManager.Singleton.StartClient(); });
// }
}
} }

View File

@ -9,6 +9,7 @@ using Types.Items;
using Types.UI; using Types.UI;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
using Utils;
namespace Managers namespace Managers
{ {
@ -45,7 +46,7 @@ namespace Managers
playerCamera = GetComponentInChildren<Camera>(); playerCamera = GetComponentInChildren<Camera>();
if (playerCamera == null) if (playerCamera == null)
{ {
Debug.LogError("No camera found for player"); GameLogger.LogError("No camera found for player");
return; return;
} }
@ -62,17 +63,11 @@ namespace Managers
{ {
base.OnStartServer(); base.OnStartServer();
// reset player managers
// _playerManagers.Clear();
if (IsServerInitialized) if (IsServerInitialized)
{ {
Debug.Log("Server initialized"); GameLogger.Log("Server initialized");
if (GameManager.Instance == null) if (GameManager.Instance == null) GameLogger.Log("GameManager not found, creating new one");
{ GameInit.Instance.InitializeGameManager();
Debug.Log("GameManager not found, creating new one");
GameInit.Instance.InitializeGameManager();
}
} }
if (IsClientInitialized) if (IsClientInitialized)
@ -83,24 +78,49 @@ namespace Managers
} }
} }
private IEnumerator WaitForServerInitialization()
{
while (!IsServerInitialized)
{
GameLogger.Log("Waiting for server to initialize...");
yield return new WaitForSeconds(0.1f);
}
GameLogger.Log("Server initialized");
GameInit.Instance.InitializeGameManager();
}
public override void OnStartClient() public override void OnStartClient()
{ {
base.OnStartClient(); base.OnStartClient();
Debug.Log("Client started. IsServer: " + IsServerInitialized + ", IsClient: " + IsClientInitialized); GameLogger.Log("Client started. IsServer: " + IsServerInitialized + ", IsClient: " + IsClientInitialized);
if (IsClientInitialized && !IsServerInitialized) // This is a client-only instance if (IsClientInitialized && !IsServerInitialized) // This is a client-only instance
{
StartCoroutine(WaitForConnectionAndRegister()); StartCoroutine(WaitForConnectionAndRegister());
}
else if (IsServerInitialized && IsClientInitialized) // This is the server or a host (client+server) else if (IsServerInitialized && IsClientInitialized) // This is the server or a host (client+server)
{
GameLogger.Log("Server and client initialized, registering player...");
// GameInit.Instance.InitializeGameManager();
RegisterPlayer(); RegisterPlayer();
}
}
public override void OnStartNetwork()
{
base.OnStartNetwork();
GameLogger.Log("PlayerManager: Network started");
} }
private IEnumerator WaitForConnectionAndRegister() private IEnumerator WaitForConnectionAndRegister()
{ {
Debug.Log("Waiting for connection to server..."); GameLogger.Log("Waiting for connection to server...");
while (!IsClientInitialized) yield return new WaitForSeconds(0.5f); while (!IsClientInitialized) yield return new WaitForSeconds(0.5f);
Debug.Log("Connected to server. Registering player..."); GameLogger.Log("Connected to server. Registering player...");
RegisterPlayer(); RegisterPlayer();
} }
@ -108,7 +128,7 @@ namespace Managers
private void RegisterPlayer() private void RegisterPlayer()
{ {
// Your existing registration code... // Your existing registration code...
Debug.Log("Attempting to register player on server." + Owner.ClientId + ", IsOwner: " + IsOwner); GameLogger.Log("Attempting to register player on server." + Owner.ClientId + ", IsOwner: " + IsOwner);
var playerData = new GamePlayer(_playerDataSo) var playerData = new GamePlayer(_playerDataSo)
{ {
@ -138,8 +158,14 @@ namespace Managers
public GamePlayer GetPlayerData() public GamePlayer GetPlayerData()
{ {
if (GameManager.Instance == null)
{
GameLogger.LogWarning("GameManager not found");
return null;
}
// get player data from GameManager // get player data from GameManager
// Debug.Log("Getting player data for clientId: " + Owner.ClientId); // GameLogger.Log("Getting player data for clientId: " + Owner.ClientId);
return GameManager.Instance.GetPlayer(Owner.ClientId); return GameManager.Instance.GetPlayer(Owner.ClientId);
} }
@ -154,10 +180,10 @@ namespace Managers
{ {
foreach (var playerManager in _playerManagers) foreach (var playerManager in _playerManagers)
{ {
Debug.Log("PlayerManager: " + playerManager.Key); GameLogger.Log("PlayerManager: " + playerManager.Key);
Debug.Log("PlayerManager.IsOwner: " + playerManager.Value.IsOwner); GameLogger.Log("PlayerManager.IsOwner: " + playerManager.Value.IsOwner);
Debug.Log("PlayerManager.IsClientInitialized: " + playerManager.Value.IsClientInitialized); GameLogger.Log("PlayerManager.IsClientInitialized: " + playerManager.Value.IsClientInitialized);
Debug.Log("PlayerManager.IsServerInitialized: " + playerManager.Value.IsServerInitialized); GameLogger.Log("PlayerManager.IsServerInitialized: " + playerManager.Value.IsServerInitialized);
} }
} }
@ -170,14 +196,14 @@ namespace Managers
{ {
while (!IsClientInitialized && !IsClientStarted) while (!IsClientInitialized && !IsClientStarted)
{ {
Debug.Log("Waiting for client to be initialized"); GameLogger.Log("Waiting for client to be initialized");
yield return null; yield return null;
} }
Debug.Log("Client is Ready to RegisterPlayer"); GameLogger.Log("Client is Ready to RegisterPlayer");
if (Owner == null) Debug.LogError("OwnerConnection not found"); if (Owner == null) GameLogger.LogError("OwnerConnection not found");
if (gameManager == null) gameManager = FindObjectOfType<GameManager>(); if (gameManager == null) gameManager = FindObjectOfType<GameManager>();
Debug.Log("GameManager should be found"); GameLogger.Log("GameManager should be found");
gameManager.RegisterPlayerServerRpc(Owner, _playerData.Value); gameManager.RegisterPlayerServerRpc(Owner, _playerData.Value);
}*/ }*/
@ -187,24 +213,24 @@ namespace Managers
if (gameManager == null) if (gameManager == null)
{ {
Debug.Log("Trying to find GameManager"); GameLogger.Log("Trying to find GameManager");
GameInit.Instance.InitializeGameManager(); GameInit.Instance.InitializeGameManager();
gameManager = FindObjectOfType<GameManager>(); gameManager = FindObjectOfType<GameManager>();
if (gameManager == null) if (gameManager == null)
{ {
Debug.LogError("GameManager not found"); GameLogger.LogError("GameManager not found");
return; return;
} }
if (gameManager) Debug.Log("GameManager found"); if (gameManager) GameLogger.Log("GameManager found");
} }
if (IsOwner) if (IsOwner)
{ {
if (_playerData.Value == null) if (_playerData.Value == null)
{ {
Debug.LogWarning("PlayerData not found"); GameLogger.LogWarning("PlayerData not found");
// load a scriptable objects default player data // load a scriptable objects default player data
var playerData = var playerData =
AssetDatabase.LoadAssetAtPath<GamePlayerSo>("Assets/Resources/DefaultPlayer.asset"); AssetDatabase.LoadAssetAtPath<GamePlayerSo>("Assets/Resources/DefaultPlayer.asset");
@ -217,9 +243,9 @@ namespace Managers
InitializeManager(); InitializeManager();
Debug.Log("PlayerManager RegisterPlayer"); GameLogger.Log("PlayerManager RegisterPlayer");
if (Owner == null) Debug.LogError("OwnerConnection not found"); if (Owner == null) GameLogger.LogError("OwnerConnection not found");
StartCoroutine(WaitForClientActiveAndRegister()); StartCoroutine(WaitForClientActiveAndRegister());
// gameManager.RegisterPlayerServerRpc(Owner, _playerData.Value); // gameManager.RegisterPlayerServerRpc(Owner, _playerData.Value);
@ -240,16 +266,16 @@ namespace Managers
switch (slotType) switch (slotType)
{ {
case SlotType.Inventory: case SlotType.Inventory:
Debug.Log("Getting Inventory Manager"); GameLogger.Log("Getting Inventory Manager");
return inventoryManager; return inventoryManager;
case SlotType.Toolbar: case SlotType.Toolbar:
Debug.Log("Getting Toolbar Manager"); GameLogger.Log("Getting Toolbar Manager");
return toolbarManager; return toolbarManager;
case SlotType.Equipment: case SlotType.Equipment:
Debug.Log("Getting Equipment Manager"); GameLogger.Log("Getting Equipment Manager");
return equipmentManager; return equipmentManager;
case SlotType.Box: case SlotType.Box:
Debug.Log("Getting Box Manager"); GameLogger.Log("Getting Box Manager");
return BoxManager.Instance; return BoxManager.Instance;
case SlotType.Crafting: case SlotType.Crafting:
break; break;
@ -266,9 +292,9 @@ namespace Managers
public GameSlot GetSlot(SlotType slotType, int slotId) public GameSlot GetSlot(SlotType slotType, int slotId)
{ {
Debug.Log("Getting SlotType " + slotType + " / " + slotId); GameLogger.Log("Getting SlotType " + slotType + " / " + slotId);
var manager = GetManagerBySlotType(slotType); var manager = GetManagerBySlotType(slotType);
if (manager == null) Debug.LogError("Manager not found"); if (manager == null) GameLogger.LogError("Manager not found");
if (manager != null) return manager.GetSlot(slotId); if (manager != null) return manager.GetSlot(slotId);
return null; return null;
} }
@ -286,7 +312,7 @@ namespace Managers
[Server] [Server]
public void Initialize(GamePlayer data) public void Initialize(GamePlayer data)
{ {
Debug.Log("Initializing PlayerManager"); GameLogger.Log("Initializing PlayerManager");
_playerData.Value = data; _playerData.Value = data;
inventoryManager.Initialize(data); inventoryManager.Initialize(data);
toolbarManager.Initialize(data); toolbarManager.Initialize(data);

View File

@ -1,5 +1,6 @@
using Components.Grid; using Components.Grid;
using UnityEngine; using UnityEngine;
using Utils;
public class PrefabManager : MonoBehaviour public class PrefabManager : MonoBehaviour
{ {
@ -19,7 +20,7 @@ public class PrefabManager : MonoBehaviour
private void Awake() private void Awake()
{ {
Debug.Log("PrefabManager Awake"); GameLogger.Log("PrefabManager Awake");
if (Instance == null) if (Instance == null)
{ {
Instance = this; Instance = this;
@ -35,20 +36,20 @@ public class PrefabManager : MonoBehaviour
private void LoadCropPrefabs() private void LoadCropPrefabs()
{ {
cropPrefabs = Resources.LoadAll<GameObject>("Prefabs/Interactable/Crops"); cropPrefabs = Resources.LoadAll<GameObject>("Prefabs/Interactable/Crops");
Debug.Log("Loaded " + cropPrefabs.Length + " crop prefabs"); GameLogger.Log("Loaded " + cropPrefabs.Length + " crop prefabs");
} }
public GameObject GetSlotPrefab() public GameObject GetSlotPrefab()
{ {
Debug.Log("Getting Slot Pefab"); GameLogger.Log("Getting Slot Pefab");
if (slotPrefab == null) Debug.LogWarning("SlotPrefab is null"); if (slotPrefab == null) GameLogger.LogWarning("SlotPrefab is null");
return slotPrefab; return slotPrefab;
} }
public GameObject GetHotkeyEntryPrefab() public GameObject GetHotkeyEntryPrefab()
{ {
Debug.Log("Getting HotkeyEntry Pefab"); GameLogger.Log("Getting HotkeyEntry Pefab");
if (hotkeyEntryPrefab == null) Debug.LogWarning("HotkeyEntryPrefab is null"); if (hotkeyEntryPrefab == null) GameLogger.LogWarning("HotkeyEntryPrefab is null");
return hotkeyEntryPrefab; return hotkeyEntryPrefab;
} }
@ -84,7 +85,7 @@ public class PrefabManager : MonoBehaviour
cropInteractable.Initialize(); cropInteractable.Initialize();
Debug.Log("Crop Prefab Instance initialized"); GameLogger.Log("Crop Prefab Instance initialized");
return crop; return crop;
} }
} }

View File

@ -4,6 +4,7 @@ using System.IO;
using Data.ScriptableObjects; using Data.ScriptableObjects;
using Types; using Types;
using UnityEngine; using UnityEngine;
using Utils;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
namespace Managers namespace Managers
@ -86,21 +87,21 @@ namespace Managers
GameState.Players.Add(0, newPlayerData); GameState.Players.Add(0, newPlayerData);
// add items to inventory // add items to inventory
if (itemDatabase == null) if (itemDatabase == null)
itemDatabase = Resources.Load<ItemDatabase>("GameItems"); itemDatabase = Resources.Load<ItemDatabase>("GameItems");
if (itemDatabase == null) if (itemDatabase == null)
{ {
Debug.LogError("ItemDatabase is null"); GameLogger.LogError("ItemDatabase is null");
//TODO: remove? //TODO: remove?
LoadGame();
return; return;
} }
if (itemDatabase.AllItems.Count == 0) if (itemDatabase.AllItems.Count == 0)
itemDatabase.LoadAllItems(); itemDatabase.LoadAllItems();
Debug.Log("Item count: " + itemDatabase.AllItems.Count); GameLogger.Log("Item count: " + itemDatabase.AllItems.Count);
for (var i = 0; i < 10; i++) for (var i = 0; i < 10; i++)
{ {
@ -110,7 +111,16 @@ namespace Managers
GameState.Players[0].AddItemToInventory(item); GameState.Players[0].AddItemToInventory(item);
} }
LoadGame(); var guid = Guid.NewGuid();
var save = new Save
{
GameState = GameState,
ID = guid.ToString(),
Name = GameState.Players[0].PlayerName
};
LoadGame(save);
} }
public List<Save> GetSaves() public List<Save> GetSaves()

View File

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using Utils;
namespace Managers namespace Managers
{ {
@ -115,7 +116,7 @@ namespace Managers
public void OnClick_CloseHotkey() public void OnClick_CloseHotkey()
{ {
Debug.Log("OnClick_CloseHotkey"); GameLogger.Log("OnClick_CloseHotkey");
if (HotkeyPanel != null) HotkeyPanel.SetActive(false); if (HotkeyPanel != null) HotkeyPanel.SetActive(false);
// Add more cases as needed // Add more cases as needed
// HotkeyUIController.Instance.PopulateHotkeyList(); // HotkeyUIController.Instance.PopulateHotkeyList();
@ -137,7 +138,7 @@ namespace Managers
public void SetUIZoomLevel(float zoomLevel) public void SetUIZoomLevel(float zoomLevel)
{ {
Debug.Log("Modifying Zoom level for UI: " + zoomLevel); GameLogger.Log("Modifying Zoom level for UI: " + zoomLevel);
SetZoomLevel(ManagementPanel, zoomLevel); SetZoomLevel(ManagementPanel, zoomLevel);
SetZoomLevel(ToolbarPanel, zoomLevel); SetZoomLevel(ToolbarPanel, zoomLevel);
} }

View File

@ -4,6 +4,7 @@ using FishNet.Object.Synchronizing;
using Managers; using Managers;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using Utils;
public class PlayerController : NetworkBehaviour public class PlayerController : NetworkBehaviour
{ {
@ -131,7 +132,7 @@ public class PlayerController : NetworkBehaviour
player.moveInput.y = Input.GetAxisRaw("Vertical"); player.moveInput.y = Input.GetAxisRaw("Vertical");
// Debug.Log("Move?"); // GameLogger.Log("Move?");
player.moveInput.Normalize(); player.moveInput.Normalize();
// Prevents diagonal movement // Prevents diagonal movement
@ -229,7 +230,7 @@ public class PlayerController : NetworkBehaviour
private void OnPositionChange(Vector3 prev, Vector3 next, bool asServer) private void OnPositionChange(Vector3 prev, Vector3 next, bool asServer)
{ {
Debug.Log("Position changed"); GameLogger.Log("Position changed");
if (!asServer && !IsOwner) transform.position = next; if (!asServer && !IsOwner) transform.position = next;
} }
@ -243,6 +244,7 @@ public class PlayerController : NetworkBehaviour
private void SetDirectionObserversRpc(string activeDir) private void SetDirectionObserversRpc(string activeDir)
{ {
var player = playerManager.GetPlayerData(); var player = playerManager.GetPlayerData();
if (player == null) return;
faceR.SetActive(false); faceR.SetActive(false);
faceL.SetActive(false); faceL.SetActive(false);
faceD.SetActive(false); faceD.SetActive(false);
@ -279,9 +281,9 @@ public class PlayerController : NetworkBehaviour
private void OnSceneLoadEnd(Scene scene, LoadSceneMode mode) private void OnSceneLoadEnd(Scene scene, LoadSceneMode mode)
{ {
Debug.Log("Scene loaded: " + scene.name); GameLogger.Log("Scene loaded: " + scene.name);
Debug.Log("Scene mode: " + mode); GameLogger.Log("Scene mode: " + mode);
Debug.Log("Connecting camera to player..."); GameLogger.Log("Connecting camera to player...");
// Get the cinemachine camera component from the scene and set the player as the follow target // Get the cinemachine camera component from the scene and set the player as the follow target
var cinemachineVirtualCamera = scene.GetRootGameObjects()[0].GetComponent<Camera>() var cinemachineVirtualCamera = scene.GetRootGameObjects()[0].GetComponent<Camera>()
.GetComponentInChildren<CinemachineVirtualCamera>(); .GetComponentInChildren<CinemachineVirtualCamera>();
@ -499,12 +501,12 @@ public PlayerData GetPlayerData()
// { // {
// if (!IsServerInitialized) // if (!IsServerInitialized)
// { // {
// Debug.Log("Server Not initialized"); // GameLogger.Log("Server Not initialized");
// return; // return;
// } // }
// //
// Debug.Log("Moving player..."); // GameLogger.Log("Moving player...");
// Debug.Log(moveInput); // GameLogger.Log(moveInput);
// player.moveInput = moveInput; // player.moveInput = moveInput;
// //
// rb2d.velocity = player.moveInput * player.moveSpeed; // rb2d.velocity = player.moveInput * player.moveSpeed;
@ -515,13 +517,14 @@ public PlayerData GetPlayerData()
private void SyncMovementObserversRpc(Vector2 moveInput) private void SyncMovementObserversRpc(Vector2 moveInput)
{ {
// if (IsOwner) return; // if (IsOwner) return;
if (playerManager == null) return;
var player = playerManager.GetPlayerData(); var player = playerManager.GetPlayerData();
// Debug.Log("Syncing movement..."); // GameLogger.Log("Syncing movement...");
// Updates non-owned clients // Updates non-owned clients
if (player != null) if (player != null)
rb2d.velocity = moveInput * player.MoveSpeed; rb2d.velocity = moveInput * player.MoveSpeed;
// else // else
// Debug.LogWarning("Player not found"); // GameLogger.LogWarning("Player not found");
// transform.position += (Vector3)(moveInput * (_player.MoveSpeed * Time.deltaTime)); // transform.position += (Vector3)(moveInput * (_player.MoveSpeed * Time.deltaTime));
} }

View File

@ -7,19 +7,18 @@ using Managers;
using UI; using UI;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using Utils;
public class SceneLoader : NetworkBehaviour, IPointerClickHandler public class SceneLoader : NetworkBehaviour, IPointerClickHandler
{ {
private static Dictionary<int, string> playerScenes = new(); private static readonly Dictionary<int, string> playerScenes = new();
[SerializeField] private string sceneName; [SerializeField] public string sceneName;
[SerializeField] private Vector3 spawnPosition; [SerializeField] public Vector3 spawnPosition;
private int _stackedSceneHandle; private int _stackedSceneHandle;
private void Awake() private void Awake()
{ {
// InstanceFinder.NetworkManager.SceneManager.AddOwnerToDefaultScene(GetComponent<NetworkObject>());
} }
private void Start() private void Start()
@ -35,62 +34,76 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
private void OnCollisionEnter(Collision collision) private void OnCollisionEnter(Collision collision)
{ {
Debug.Log("OnCollisionEnter triggered"); GameLogger.Log("OnCollisionEnter triggered");
} }
private void OnTriggerEnter2D(Collider2D other) private void OnTriggerEnter2D(Collider2D other)
{ {
Debug.Log("OnTriggerEnter triggered"); GameLogger.Log("OnTriggerEnter triggered");
if (!IsClientInitialized) return; if (!IsClientInitialized) return;
GameTimeManager.Instance.Pause(); GameTimeManager.Instance.Pause();
LoadingScreenUIController.Instance.TriggerLoadingScreen(); LoadingScreenUIController.Instance.TriggerLoadingScreen();
Debug.Log("On Trigger ENTEREED"); GameLogger.Log("On Trigger ENTERED");
var nob = other.gameObject.GetComponent<NetworkObject>(); var nob = other.gameObject.GetComponent<NetworkObject>();
// Debug.Log("Player with clientID " + other.gameObject.GetInstanceID() + " entered trigger"); // GameLogger.Log("Player with clientID " + other.gameObject.GetInstanceID() + " entered trigger");
var otherConnection = other.GetComponent<NetworkObject>().Owner; var otherConnection = other.GetComponent<NetworkObject>().Owner;
Debug.Log("Player with clientID " + otherConnection.ClientId + " entered trigger"); GameLogger.Log("Player with clientID " + otherConnection.ClientId + " entered trigger");
// if (nob != null) LoadScene(InstanceFinder.ClientManager.Connection.ClientId); // if (nob != null) LoadScene(InstanceFinder.ClientManager.Connection.ClientId);
RequestSceneLoadServerRpc(otherConnection.ClientId); RequestSceneLoadServerRpc(otherConnection.ClientId);
GameTimeManager.Instance.Resume(); GameTimeManager.Instance.Resume();
} }
[ServerRpc(RequireOwnership = false)]
private void RequestSceneLoadServerRpc(int clientId) public void OnPointerClick(PointerEventData eventData)
{ {
Debug.Log($"Received scene load request for client {clientId}"); /*if (!IsOwner)
{
GameLogger.Log("Not local player owner, not loading scene");
return;
}*/
GameLogger.Log("Clicked scene loader");
var clientId = InstanceFinder.ClientManager.Connection.ClientId;
GameLogger.Log("Player with clientID " + clientId + " clicked scene loader");
LoadScene(clientId);
}
[ServerRpc(RequireOwnership = false)]
public void RequestSceneLoadServerRpc(int clientId)
{
GameLogger.Log($"Received scene load request for client {clientId}");
LoadSceneForClient(clientId); LoadSceneForClient(clientId);
} }
[Server] [Server]
private void LoadSceneForClient(int clientId) private void LoadSceneForClient(int clientId)
{ {
Debug.Log($"Loading scene for client {clientId}"); GameLogger.Log($"Loading scene for client {clientId}");
NetworkConnection connection = InstanceFinder.ServerManager.Clients[clientId]; var connection = InstanceFinder.ServerManager.Clients[clientId];
if (connection == null) if (connection == null)
{ {
Debug.LogError($"No connection found for client {clientId}"); GameLogger.LogError($"No connection found for client {clientId}");
return; return;
} }
var sceneLoadData = new SceneLoadData(SceneLookupData.CreateData(sceneName)); var sceneLoadData = new SceneLoadData(SceneLookupData.CreateData(sceneName));
sceneLoadData.ReplaceScenes = ReplaceOption.All; sceneLoadData.ReplaceScenes = ReplaceOption.All;
sceneLoadData.Options.AllowStacking = true; // Allow multiple scene instances sceneLoadData.Options.AllowStacking = true; // Allow multiple scene instances
InstanceFinder.SceneManager.LoadConnectionScenes(connection, sceneLoadData); InstanceFinder.SceneManager.LoadConnectionScenes(connection, sceneLoadData);
// Unload the previous scene for this client // Unload the previous scene for this client
if (playerScenes.TryGetValue(clientId, out string previousScene)) if (playerScenes.TryGetValue(clientId, out var previousScene))
{
InstanceFinder.SceneManager.UnloadConnectionScenes(connection, new SceneUnloadData(previousScene)); InstanceFinder.SceneManager.UnloadConnectionScenes(connection, new SceneUnloadData(previousScene));
}
// Update the player's current scene // Update the player's current scene
playerScenes[clientId] = sceneName; playerScenes[clientId] = sceneName;
// Move the player to the spawn position // Move the player to the spawn position
var playerManager = PlayerManager.GetPlayerManager(clientId); var playerManager = PlayerManager.GetPlayerManager(clientId);
if (playerManager != null) if (playerManager != null)
@ -103,24 +116,6 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
} }
} }
} }
public void OnPointerClick(PointerEventData eventData)
{
/*if (!IsOwner)
{
Debug.Log("Not local player owner, not loading scene");
return;
}*/
Debug.Log("Clicked scene loader");
var clientId = InstanceFinder.ClientManager.Connection.ClientId;
Debug.Log("Player with clientID " + clientId + " clicked scene loader");
LoadScene(clientId);
}
private void SceneManager_OnLoadEnd(SceneLoadEndEventArgs data) private void SceneManager_OnLoadEnd(SceneLoadEndEventArgs data)
{ {
@ -136,7 +131,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
public override void OnStartServer() public override void OnStartServer()
{ {
Debug.Log("SceneLoader OnStartServer"); GameLogger.Log("SceneLoader OnStartServer");
base.OnStartServer(); base.OnStartServer();
@ -148,7 +143,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
[ServerRpc(RequireOwnership = false)] [ServerRpc(RequireOwnership = false)]
private void LoadScene(int clientId) private void LoadScene(int clientId)
{ {
Debug.Log("Loading scene"); GameLogger.Log("Loading scene");
var sceneLoadData = new SceneLoadData(SceneLookupData.CreateData(sceneName)); var sceneLoadData = new SceneLoadData(SceneLookupData.CreateData(sceneName));
sceneLoadData.ReplaceScenes = ReplaceOption.None; sceneLoadData.ReplaceScenes = ReplaceOption.None;
sceneLoadData.Options.AllowStacking = false; sceneLoadData.Options.AllowStacking = false;
@ -157,7 +152,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
InstanceFinder.SceneManager.UnloadConnectionScenes(InstanceFinder.ClientManager.Connection, InstanceFinder.SceneManager.UnloadConnectionScenes(InstanceFinder.ClientManager.Connection,
new SceneUnloadData("StartMenu")); new SceneUnloadData("StartMenu"));
// Debug.Log("Moving player to spawn position for clientId" + clientId); // GameLogger.Log("Moving player to spawn position for clientId" + clientId);
// MovePlayerToSpawnPositionServerRpc(clientId); // MovePlayerToSpawnPositionServerRpc(clientId);
// StartCoroutine(MovePlayerToSpawnPosition(clientId)); // StartCoroutine(MovePlayerToSpawnPosition(clientId));
@ -166,11 +161,11 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
// get players network object // get players network object
if (player == null) if (player == null)
{ {
Debug.LogError("Player is null, can not move player to spawn position"); GameLogger.LogError("Player is null, can not move player to spawn position");
return; return;
} }
Debug.Log("Moving player to spawn position: " + spawnPosition); GameLogger.Log("Moving player to spawn position: " + spawnPosition);
player.transform.position = spawnPosition; player.transform.position = spawnPosition;
playerCamera.gameObject.SetActive(true); playerCamera.gameObject.SetActive(true);
@ -184,7 +179,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
[ObserversRpc] [ObserversRpc]
private void SetupPlayerCameraObserversRpc(int clientId) private void SetupPlayerCameraObserversRpc(int clientId)
{ {
Debug.Log("SetupPlayerCameraObserversRpc triggered for clientId: " + clientId); GameLogger.Log("SetupPlayerCameraObserversRpc triggered for clientId: " + clientId);
var playerManager = PlayerManager.GetPlayerManager(clientId); var playerManager = PlayerManager.GetPlayerManager(clientId);
if (playerManager == null) return; if (playerManager == null) return;
var playerGo = playerManager.GetPlayerGo(); var playerGo = playerManager.GetPlayerGo();
@ -194,9 +189,9 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
if (camera == null) return; if (camera == null) return;
// enable camera only for the local player // enable camera only for the local player
camera.enabled = true; camera.enabled = true;
Camera.main.gameObject.SetActive(false); Camera.main.gameObject.SetActive(false);
camera.tag = "MainCamera"; camera.tag = "MainCamera";
playerManager.SetupCamera(); playerManager.SetupCamera();
} }
@ -204,7 +199,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
// [ServerRpc(RequireOwnership = false)] // [ServerRpc(RequireOwnership = false)]
// private void MovePlayerToSpawnPositionServerRpc(int clientId) // private void MovePlayerToSpawnPositionServerRpc(int clientId)
// { // {
// Debug.Log("Preparing to move player to spawn position (SERVERRPC) for clientId " + clientId); // GameLogger.Log("Preparing to move player to spawn position (SERVERRPC) for clientId " + clientId);
// StartCoroutine(MovePlayerToSpawnPosition(clientId)); // StartCoroutine(MovePlayerToSpawnPosition(clientId));
// } // }
@ -220,13 +215,13 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
// //
// if (player == null) // if (player == null)
// { // {
// Debug.LogError("Player is null, can not move player to spawn position"); // GameLogger.LogError("Player is null, can not move player to spawn position");
// yield return null; // yield return null;
// } // }
// //
// if (player != null) // if (player != null)
// { // {
// Debug.Log("Moving player to spawn position: " + spawnPosition); // GameLogger.Log("Moving player to spawn position: " + spawnPosition);
// player.transform.position = spawnPosition; // player.transform.position = spawnPosition;
// //
// UpdatePlayerPositionObserversRpc(player.gameObject.GetInstanceID(), spawnPosition); // UpdatePlayerPositionObserversRpc(player.gameObject.GetInstanceID(), spawnPosition);
@ -267,7 +262,7 @@ public class SceneLoader : NetworkBehaviour, IPointerClickHandler
if (InstanceFinder.ClientManager.Objects.Spawned.TryGetValue(playerObjectId, out var playerObject)) if (InstanceFinder.ClientManager.Objects.Spawned.TryGetValue(playerObjectId, out var playerObject))
playerObject.transform.position = position; playerObject.transform.position = position;
else else
Debug.LogWarning("Player not found"); GameLogger.LogWarning("Player not found");
} }

View File

@ -4,6 +4,7 @@ using Data.ScriptableObjects;
using Types.Items; using Types.Items;
using Types.UI; using Types.UI;
using UnityEngine; using UnityEngine;
using Utils;
namespace Types namespace Types
{ {
@ -258,7 +259,7 @@ namespace Types
return; return;
} }
Debug.LogWarning("No empty slots available to add item: " + item.ItemName); GameLogger.LogWarning("No empty slots available to add item: " + item.ItemName);
} }
} }
} }

View File

@ -3,6 +3,7 @@ using Components.UI;
using Data.ScriptableObjects.World; using Data.ScriptableObjects.World;
using Managers.Item; using Managers.Item;
using UnityEngine; using UnityEngine;
using Utils;
// InventoryUI.cs // InventoryUI.cs
@ -14,10 +15,10 @@ public class BoxUIController : MonoBehaviour
private void Start() private void Start()
{ {
Debug.Log("BoxUI Start"); GameLogger.Log("BoxUI Start");
if (itemParent == null) if (itemParent == null)
{ {
Debug.LogWarning("ItemParent is null! Can not attach"); GameLogger.LogWarning("ItemParent is null! Can not attach");
return; return;
} }
@ -34,19 +35,19 @@ public class BoxUIController : MonoBehaviour
UpdateUI(BoxManager.Instance.ActiveBoxInteractable); UpdateUI(BoxManager.Instance.ActiveBoxInteractable);
Debug.Log("Finished adding items to toolbar slots"); GameLogger.Log("Finished adding items to toolbar slots");
} }
public void ListChildren(GameObject parent) public void ListChildren(GameObject parent)
{ {
foreach (Transform child in parent.transform) Debug.Log("Child: " + child.name); foreach (Transform child in parent.transform) GameLogger.Log("Child: " + child.name);
} }
public void UpdateUI(BoxInteractable boxInteractable) public void UpdateUI(BoxInteractable boxInteractable)
{ {
// clear all exisitings slots // clear all exisitings slots
Debug.Log("Updating UI displaying box: " + boxInteractable.id + " / " + boxInteractable.name); GameLogger.Log("Updating UI displaying box: " + boxInteractable.id + " / " + boxInteractable.name);
_slots.Clear(); _slots.Clear();
foreach (Transform child in itemParent) Destroy(child.gameObject); foreach (Transform child in itemParent) Destroy(child.gameObject);

View File

@ -3,6 +3,7 @@ using Components.UI;
using Managers; using Managers;
using Managers.Item; using Managers.Item;
using UnityEngine; using UnityEngine;
using Utils;
// InventoryUI.cs // InventoryUI.cs
@ -21,15 +22,15 @@ namespace UI
{ {
if (equipmentManager == null) if (equipmentManager == null)
{ {
Debug.LogWarning("EquipmentManager is null! Can not attach"); GameLogger.LogWarning("EquipmentManager is null! Can not attach");
return; return;
} }
Debug.Log("EquipmentUI Start"); GameLogger.Log("EquipmentUI Start");
if (itemParent == null) if (itemParent == null)
{ {
Debug.LogWarning("ItemParent is null! Can not attach"); GameLogger.LogWarning("ItemParent is null! Can not attach");
return; return;
} }
@ -61,13 +62,13 @@ namespace UI
_slots.Add(i, slotDisplay); _slots.Add(i, slotDisplay);
} }
Debug.Log("Finished adding items to toolbar slots"); GameLogger.Log("Finished adding items to toolbar slots");
} }
public void ListChildren(GameObject parent) public void ListChildren(GameObject parent)
{ {
foreach (Transform child in parent.transform) Debug.Log("Child: " + child.name); foreach (Transform child in parent.transform) GameLogger.Log("Child: " + child.name);
} }
public void UpdateUI() public void UpdateUI()

View File

@ -79,6 +79,12 @@ namespace UI
return; return;
} }
if (GameManager.Instance == null)
{
Debug.LogWarning("GameManager not found");
return;
}
// need to make sure the _networkManager is initialized first // need to make sure the _networkManager is initialized first
timeText.text = GameTimeManager.Instance.GetCurrentTimeFormatted(); timeText.text = GameTimeManager.Instance.GetCurrentTimeFormatted();

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using Utils;
namespace UI namespace UI
{ {
@ -47,10 +48,10 @@ namespace UI
public void PopulateHotkeyList() public void PopulateHotkeyList()
{ {
Debug.Log("Getting all hot keys"); GameLogger.Log("Getting all hot keys");
var hotkeys = HotkeyManager.Instance.GetAllHotkeys(); var hotkeys = HotkeyManager.Instance.GetAllHotkeys();
Debug.Log("Clearing Children"); GameLogger.Log("Clearing Children");
ClearChildren(hotkeyListContainer); ClearChildren(hotkeyListContainer);
var hotkeyEntryPrefab = PrefabManager.Instance.GetHotkeyEntryPrefab(); var hotkeyEntryPrefab = PrefabManager.Instance.GetHotkeyEntryPrefab();
@ -63,14 +64,12 @@ namespace UI
var keyName = entry.transform.Find("KeyName").GetComponent<TMP_InputField>(); var keyName = entry.transform.Find("KeyName").GetComponent<TMP_InputField>();
var changeButton = entry.transform.Find("ChangeButton").GetComponent<Button>(); var changeButton = entry.transform.Find("ChangeButton").GetComponent<Button>();
Debug.Log(actionName); GameLogger.Log(actionName.text);
Debug.Log(hotkey); GameLogger.Log(hotkey.Key);
Debug.Log(hotkey.Key); GameLogger.Log(hotkey.Value.ToString());
Debug.Log(hotkey.Value); GameLogger.Log(hotkey.Value.ToString());
Debug.Log(hotkey.Value.ToString());
actionName.text = hotkey.Key; actionName.text = hotkey.Key;
Debug.Log(keyName); GameLogger.Log(keyName.text);
Debug.Log(keyName.text);
keyName.text = hotkey.Value.ToString(); keyName.text = hotkey.Value.ToString();
var currentAction = hotkey.Key; var currentAction = hotkey.Key;
@ -82,7 +81,7 @@ namespace UI
private void StartHotkeyChange(string actionName, TMP_InputField keyNameText) private void StartHotkeyChange(string actionName, TMP_InputField keyNameText)
{ {
Debug.Log("Waiting for key change"); GameLogger.Log("Waiting for key change");
StartCoroutine(WaitForKey(actionName, keyNameText)); StartCoroutine(WaitForKey(actionName, keyNameText));
} }

View File

@ -3,6 +3,7 @@ using Components.UI;
using Managers; using Managers;
using Managers.Item; using Managers.Item;
using UnityEngine; using UnityEngine;
using Utils;
// InventoryUI.cs // InventoryUI.cs
@ -22,15 +23,15 @@ public class InventoryUIController : MonoBehaviour
private void Start() private void Start()
{ {
Debug.Log("InventoryUI Start"); GameLogger.Log("InventoryUI Start");
if (itemParent == null) Debug.LogWarning("ItemParent is null! Can not attach"); if (itemParent == null) GameLogger.LogWarning("ItemParent is null! Can not attach");
UpdateUI(); UpdateUI();
} }
public void ListChildren(GameObject parent) public void ListChildren(GameObject parent)
{ {
foreach (Transform child in parent.transform) Debug.Log("Child: " + child.name); foreach (Transform child in parent.transform) GameLogger.Log("Child: " + child.name);
} }
public void UpdateUI() public void UpdateUI()
@ -63,6 +64,6 @@ public class InventoryUIController : MonoBehaviour
_slots.Add(i, slotDisplay); _slots.Add(i, slotDisplay);
} }
Debug.Log("Finished adding items to slots"); GameLogger.Log("Finished adding items to slots");
} }
} }

View File

@ -1,5 +1,6 @@
using Managers; using Managers;
using UnityEngine; using UnityEngine;
using Utils;
namespace UI namespace UI
{ {
@ -19,7 +20,7 @@ namespace UI
if (saveManager != null) if (saveManager != null)
{ {
var saves = saveManager.GetSaves(); var saves = saveManager.GetSaves();
foreach (var save in saves) Debug.Log(save.Name); foreach (var save in saves) GameLogger.Log(save.Name);
} }
} }
@ -30,18 +31,18 @@ namespace UI
public void OnClick_CloseButton() public void OnClick_CloseButton()
{ {
Debug.Log("Load menu close button"); GameLogger.Log("Load menu close button");
gameObject.SetActive(false); gameObject.SetActive(false);
} }
public void OnClick_DeleteSaveButton() public void OnClick_DeleteSaveButton()
{ {
Debug.Log("Delete save button"); GameLogger.Log("Delete save button");
} }
public void OnClick_Save() public void OnClick_Save()
{ {
Debug.Log("Save button"); GameLogger.Log("Save button");
} }
} }
} }

View File

@ -13,15 +13,24 @@ namespace UI
public GameObject settingsPanel; public GameObject settingsPanel;
public GameObject multiplayerPanel; public GameObject multiplayerPanel;
// public GameObject NewGamePanel; public GameObject newGamePanel;
public GameObject loadGamePanel;
public void OnClick_StartGame() public void OnClick_NewGame()
{ {
if (newGamePanel.activeSelf)
newGamePanel.SetActive(false);
else
newGamePanel.SetActive(true);
} }
public void OnClick_Continue() public void OnClick_Continue()
{ {
if (loadGamePanel.activeSelf)
loadGamePanel.SetActive(false);
else
loadGamePanel.SetActive(true);
} }

View File

@ -5,6 +5,7 @@ using Managers;
using TMPro; using TMPro;
using Types.Broadcasts; using Types.Broadcasts;
using UnityEngine; using UnityEngine;
using Utils;
namespace UI namespace UI
{ {
@ -20,7 +21,7 @@ namespace UI
private void Start() private void Start()
{ {
Debug.Log("NetworkChatUIController Start"); GameLogger.Log("NetworkChatUIController Start");
InstanceFinder.ServerManager.OnServerConnectionState += OnServerConnectionState; InstanceFinder.ServerManager.OnServerConnectionState += OnServerConnectionState;
InstanceFinder.ClientManager.OnClientConnectionState += OnClientConnectionState; InstanceFinder.ClientManager.OnClientConnectionState += OnClientConnectionState;
} }
@ -46,28 +47,29 @@ namespace UI
FontColor = Color.white FontColor = Color.white
}; };
Debug.Log("Sending chat message: " + chatBroadcast.Message); GameLogger.Log("Sending chat message: " + chatBroadcast.Message);
InstanceFinder.ClientManager.Broadcast(chatBroadcast); InstanceFinder.ClientManager.Broadcast(chatBroadcast);
messageInput.text = ""; messageInput.text = "";
Debug.Log("Sent message"); GameLogger.Log("Sent message");
} }
private void OnServerConnectionState(ServerConnectionStateArgs obj) private void OnServerConnectionState(ServerConnectionStateArgs obj)
{ {
Debug.Log("Server Connection State Changed " + obj.ConnectionState); GameLogger.Log("Server Connection State Changed " + obj.ConnectionState);
if (obj.ConnectionState == LocalConnectionState.Started) if (obj.ConnectionState == LocalConnectionState.Started)
{ {
Debug.Log("Registering server broadcast"); GameLogger.Log("Registering server broadcast");
InstanceFinder.ServerManager.RegisterBroadcast<ChatBroadcast>(OnServerChatBroadcast); InstanceFinder.ServerManager.RegisterBroadcast<ChatBroadcast>(OnServerChatBroadcast);
} }
} }
private void OnServerChatBroadcast(NetworkConnection connection, ChatBroadcast broadcast, Channel channel) private void OnServerChatBroadcast(NetworkConnection connection, ChatBroadcast broadcast, Channel channel)
{ {
Debug.Log("ChatBroadcast received (server)"); GameLogger.Log("ChatBroadcast received (server)");
Debug.Log("ChatBroadcast received (server) from: " + broadcast.Username + " at " + broadcast.NetworkTime); GameLogger.Log("ChatBroadcast received (server) from: " + broadcast.Username + " at " +
broadcast.NetworkTime);
InstanceFinder.ServerManager.Broadcast(broadcast); InstanceFinder.ServerManager.Broadcast(broadcast);
} }
@ -75,27 +77,27 @@ namespace UI
private void OnClientConnectionState(ClientConnectionStateArgs obj) private void OnClientConnectionState(ClientConnectionStateArgs obj)
{ {
Debug.Log("netchat-ui: Client Connection State Changed " + obj.ConnectionState); GameLogger.Log("netchat-ui: Client Connection State Changed " + obj.ConnectionState);
var clientState = obj.ConnectionState; var clientState = obj.ConnectionState;
if (clientState == LocalConnectionState.Started) if (clientState == LocalConnectionState.Started)
{ {
Debug.Log("Registering client for broadcast"); GameLogger.Log("Registering client for broadcast");
InstanceFinder.ClientManager.RegisterBroadcast<ChatBroadcast>(OnChatBroadcast); InstanceFinder.ClientManager.RegisterBroadcast<ChatBroadcast>(OnChatBroadcast);
} }
else if (clientState == LocalConnectionState.Stopped) else if (clientState == LocalConnectionState.Stopped)
{ {
Debug.Log("Unregistering client for broadcast"); GameLogger.Log("Unregistering client for broadcast");
InstanceFinder.ClientManager.UnregisterBroadcast<ChatBroadcast>(OnChatBroadcast); InstanceFinder.ClientManager.UnregisterBroadcast<ChatBroadcast>(OnChatBroadcast);
} }
} }
private void OnChatBroadcast(ChatBroadcast broadcast, Channel channel) private void OnChatBroadcast(ChatBroadcast broadcast, Channel channel)
{ {
Debug.Log("ChatBroadcast received"); GameLogger.Log("ChatBroadcast received");
// Debug.Log(broadcast.Message, broadcast.FontColor, broadcast.Username); // GameLogger.Log(broadcast.Message, broadcast.FontColor, broadcast.Username);
Debug.Log("ChatBroadcast received from: " + broadcast.Username + " at " + broadcast.NetworkTime); GameLogger.Log("ChatBroadcast received from: " + broadcast.Username + " at " + broadcast.NetworkTime);
Debug.Log("ChatBroadcast message: " + broadcast.Message); GameLogger.Log("ChatBroadcast message: " + broadcast.Message);
AddMessageToUI(broadcast); AddMessageToUI(broadcast);
} }

View File

@ -5,7 +5,7 @@ using Managers;
using Types; using Types;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using Utils;
namespace UI namespace UI
{ {
@ -25,27 +25,42 @@ namespace UI
private NetworkManager _networkManager; private NetworkManager _networkManager;
private LocalConnectionState _serverState = LocalConnectionState.Stopped; private LocalConnectionState _serverState = LocalConnectionState.Stopped;
public static NetworkUIController Instance { get; private set; }
private void Awake()
{
if (Instance == null)
{
Instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
}
}
private void Start() private void Start()
{ {
_playerList.Clear(); _playerList.Clear();
_networkManager = FindObjectOfType<NetworkManager>(); _networkManager = FindObjectOfType<NetworkManager>();
if (_networkManager == null) if (_networkManager == null)
{ {
Debug.LogError("NetworkManager not found, HUD will not function."); GameLogger.LogError("NetworkManager not found, HUD will not function.");
} }
else else
{ {
UpdateColor(LocalConnectionState.Stopped, ref serverIndicator); // UpdateColor(LocalConnectionState.Stopped, ref serverIndicator);
UpdateColor(LocalConnectionState.Stopped, ref clientIndicator); // UpdateColor(LocalConnectionState.Stopped, ref clientIndicator);
_networkManager.ServerManager.OnServerConnectionState += OnServerConnectionState; _networkManager.ServerManager.OnServerConnectionState += OnServerConnectionState;
_networkManager.ClientManager.OnClientConnectionState += OnClientConnectionState; _networkManager.ClientManager.OnClientConnectionState += OnClientConnectionState;
} }
// host.GetComponent<Button>().onClick.AddListener(OnClick_Client); // host.GetComponent<Button>().onClick.AddListener(OnClick_Client);
// serverButton.GetComponent<Button>().onClick.AddListener(OnClick_Server); // serverButton.GetComponent<Button>().onClick.AddListener(OnClick_Server);
hostNewButton.GetComponent<Button>().onClick.AddListener(OnClick_HostNew); // hostNewButton.GetComponent<Button>().onClick.AddListener(OnClick_HostNew);
hostSaveButton.GetComponent<Button>().onClick.AddListener(OnClick_HostSave); // hostSaveButton.GetComponent<Button>().onClick.AddListener(OnClick_HostSave);
connectButton.GetComponent<Button>().onClick.AddListener(OnClick_ConnectClient); // connectButton.GetComponent<Button>().onClick.AddListener(OnClick_ConnectClient);
} }
private void OnDestroy() private void OnDestroy()
@ -96,7 +111,7 @@ namespace UI
public void OnClick_HostNew() public void OnClick_HostNew()
{ {
Debug.Log("Clicked host new"); GameLogger.Log("Clicked host new");
if (_networkManager == null) if (_networkManager == null)
return; return;
@ -106,13 +121,13 @@ namespace UI
/*if (systemsManagerPrefab == null) /*if (systemsManagerPrefab == null)
{ {
Debug.LogError("SystemsManager prefab not found"); GameLogger.LogError("SystemsManager prefab not found");
return; return;
}*/ }*/
if (gameManagerPrefab == null) if (gameManagerPrefab == null)
{ {
Debug.LogError("GameManager prefab not found"); GameLogger.LogError("GameManager prefab not found");
return; return;
} }
@ -121,18 +136,19 @@ namespace UI
OnClick_Client(); OnClick_Client();
var saveManager = FindObjectOfType<SaveManager>(); var saveManager = FindObjectOfType<SaveManager>();
if (saveManager == null) Debug.LogError("SaveManager not found, playerData will be null"); if (saveManager == null) GameLogger.LogError("SaveManager not found, playerData will be null");
// check if save manager is loaded // check if save manager is loaded
if (saveManager.GameState == null) Debug.LogError("GameState is null, playerData will be null"); if (saveManager.GameState == null) GameLogger.LogError("GameState is null, playerData will be null");
// TODO: Go to NewGamePanel, and flag for MP. // TODO: Go to NewGamePanel, and flag for MP.
GameLogger.Log("Completed host new click flow");
} }
public void OnClick_HostSave() public void OnClick_HostSave()
{ {
Debug.Log("Clicked host save"); GameLogger.Log("Clicked host save");
if (_networkManager == null) if (_networkManager == null)
return; return;
@ -143,7 +159,7 @@ namespace UI
public void OnClick_Server() public void OnClick_Server()
{ {
Debug.Log("Clicked server"); GameLogger.Log("Clicked server");
if (_networkManager == null) if (_networkManager == null)
return; return;
@ -157,7 +173,7 @@ namespace UI
public void OnClick_Client() public void OnClick_Client()
{ {
Debug.Log("Clicked client"); GameLogger.Log("Clicked client");
if (_networkManager == null) if (_networkManager == null)
return; return;

View File

@ -0,0 +1,95 @@
using System.Collections;
using FishNet;
using UnityEngine;
namespace UI
{
public class NewGameMenuUIController : MonoBehaviour
{
public GameObject NewGameMenuPanel;
public GameObject startButton;
public GameObject closeButton;
public GameObject sceneLoaderPrefab;
private void Start()
{
}
// Update is called once per frame
private void Update()
{
}
public void OnClick_CloseButton()
{
Debug.Log("Close button");
// Close the panel
NewGameMenuPanel.SetActive(false);
}
public void OnClick_StartButton()
{
Debug.Log("NewGameMenuUIController: Start button");
LoadingScreenUIController.Instance.TriggerLoadingScreen();
// NewGameMenuPanel.SetActive(false);
// enable the multiplayer host and client
if (NetworkUIController.Instance == null)
{
//create a new network ui controller
Debug.Log("NewGameMenuUIController: Creating NetworkUIController");
var networkUIController = new GameObject("NetworkUIController").AddComponent<NetworkUIController>();
networkUIController.transform.SetParent(NewGameMenuPanel.transform);
}
NetworkUIController.Instance.OnClick_HostNew();
// todo: eventually, we want to make sure that when we play in single player mode, that it is using the right
// transport method. FishNet supports multiple transport methods, but we only want to use one at a time. Specifically,
// we will want to use the one that is for a single player game that will allow me to still use the same code.
var sceneLoaderObj = Instantiate(sceneLoaderPrefab, NewGameMenuPanel.transform);
var sceneLoader = sceneLoaderObj.GetComponent<SceneLoader>();
Debug.Log("NewGameMenuUIController: Spawning scene loader");
if (sceneLoader == null)
{
Debug.LogError("NewGameMenuUIController: SceneLoader not found");
return;
}
// create a new scene loader
sceneLoader.sceneName = "FarmMap";
sceneLoader.spawnPosition = new Vector3(30, -30, 0);
Debug.Log("NewGameMenuUIController: Waiting for server to start...");
StartCoroutine(WaitForServerAndSpawnSceneLoader(sceneLoaderObj));
// spawn the scene loader
// InstanceFinder.ServerManager.Spawn(sceneLoaderObj);
// var clientId = InstanceFinder.ClientManager.Connection.ClientId;
// if (sceneLoader != null) sceneLoader.RequestSceneLoadServerRpc(clientId);
}
private IEnumerator WaitForServerAndSpawnSceneLoader(GameObject sceneLoaderObj)
{
Debug.Log("NewGameMenuUIController: Waiting for server to start...");
while (!InstanceFinder.IsHostStarted)
{
Debug.Log("Waiting for server to start...");
yield return new WaitForSeconds(0.1f);
}
Debug.Log("Server started, spawning scene loader");
InstanceFinder.ServerManager.Spawn(sceneLoaderObj);
var clientId = InstanceFinder.ClientManager.Connection.ClientId;
var sceneLoader = sceneLoaderObj.GetComponent<SceneLoader>();
if (sceneLoader != null) sceneLoader.RequestSceneLoadServerRpc(clientId);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7c3b98530e3241059bebd2507fba1aeb
timeCreated: 1721836268

View File

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using Utils;
namespace UI namespace UI
{ {
@ -6,7 +7,7 @@ namespace UI
{ {
public void OnClick_CloseButton() public void OnClick_CloseButton()
{ {
Debug.Log("Settings closed button"); GameLogger.Log("Settings closed button");
gameObject.SetActive(false); gameObject.SetActive(false);
} }
} }

View File

@ -6,6 +6,7 @@ using Managers;
using Managers.Item; using Managers.Item;
using Types.UI; using Types.UI;
using UnityEngine; using UnityEngine;
using Utils;
// InventoryUI.cs // InventoryUI.cs
@ -25,11 +26,11 @@ namespace UI
private void Start() private void Start()
{ {
Debug.Log("ToolbarUI Start"); GameLogger.Log("ToolbarUI Start");
/*if (itemParent == null) /*if (itemParent == null)
{ {
Debug.LogWarning("ItemParent is null! Can not attach"); GameLogger.LogWarning("ItemParent is null! Can not attach");
return; return;
} }
@ -46,24 +47,24 @@ namespace UI
StartCoroutine(updateUI);*/ StartCoroutine(updateUI);*/
Debug.Log("Finished adding items to toolbar slots"); GameLogger.Log("Finished adding items to toolbar slots");
} }
public void ListChildren(GameObject parent) public void ListChildren(GameObject parent)
{ {
foreach (Transform child in parent.transform) Debug.Log("Child: " + child.name); foreach (Transform child in parent.transform) GameLogger.Log("Child: " + child.name);
} }
public void UpdateActiveSlot() public void UpdateActiveSlot()
{ {
// Update the active slot in the UI // Update the active slot in the UI
Debug.Log("Updating active slot in UI"); GameLogger.Log("Updating active slot in UI");
// set all slots to inactive // set all slots to inactive
foreach (var slot in _slots) foreach (var slot in _slots)
{ {
Debug.Log("Setting slot to inactive:" + slot.Key); GameLogger.Log("Setting slot to inactive:" + slot.Key);
slot.Value.SetSlotActive(false); slot.Value.SetSlotActive(false);
} }
@ -86,7 +87,7 @@ namespace UI
public void OnSlotClicked(int slotId) public void OnSlotClicked(int slotId)
{ {
toolbarManager.SetActiveSlot(slotId); toolbarManager.SetActiveSlot(slotId);
Debug.Log("Slot clicked: " + slotId + " / Set Active"); GameLogger.Log("Slot clicked: " + slotId + " / Set Active");
UpdateActiveSlot(); UpdateActiveSlot();
} }
@ -116,7 +117,7 @@ namespace UI
var slotComponent = slotDisplay.GetComponent<SlotComponent>(); var slotComponent = slotDisplay.GetComponent<SlotComponent>();
var slotHandler = slotDisplay.GetComponent<SlotHandler>(); var slotHandler = slotDisplay.GetComponent<SlotHandler>();
slotHandler.onSlotClicked.AddListener(() => OnSlotClicked(i)); slotHandler.onSlotClicked.AddListener(() => OnSlotClicked(i));
Debug.Log("Added slot handler to slot: " + i); GameLogger.Log("Added slot handler to slot: " + i);
// var slot = slotComponent.GetSlot(); // var slot = slotComponent.GetSlot();

View File

@ -0,0 +1,59 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using UnityEngine;
namespace Utils
{
public static class GameLogger
{
private static readonly string _logFilePath;
static GameLogger()
{
_logFilePath = Path.Combine(Application.persistentDataPath, "game_log.txt");
}
public static void Log(string message, LogType type = LogType.Log,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
var className = Path.GetFileNameWithoutExtension(sourceFilePath);
var logMessage =
$"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] [{type}] [{className}.{memberName}:{sourceLineNumber}] {message}";
Debug.unityLogger.Log(type, logMessage);
try
{
File.AppendAllText(_logFilePath, logMessage + Environment.NewLine);
}
catch (Exception e)
{
Debug.LogError($"Failed to write to log file: {e.Message}");
}
}
public static void LogInfo(string message, [CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
Log(message, LogType.Log, memberName, sourceFilePath, sourceLineNumber);
}
public static void LogWarning(string message, [CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
Log(message, LogType.Warning, memberName, sourceFilePath, sourceLineNumber);
}
public static void LogError(string message, [CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
Log(message, LogType.Error, memberName, sourceFilePath, sourceLineNumber);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 892cb7315eec4eea8113badef533a4f7
timeCreated: 1721918736

View File

@ -1,6 +1,7 @@
using FishNet.Object; using FishNet.Object;
using Managers; using Managers;
using UnityEngine; using UnityEngine;
using Utils;
public class NetworkManagerHelper : NetworkBehaviour public class NetworkManagerHelper : NetworkBehaviour
{ {
@ -12,7 +13,7 @@ public class NetworkManagerHelper : NetworkBehaviour
if (Instance == null) if (Instance == null)
{ {
Instance = this; Instance = this;
Debug.Log("NetworkManagerHelper initialized"); GameLogger.Log("NetworkManagerHelper initialized");
// NetworkManager.ServerManager. // NetworkManager.ServerManager.
} }
else else
@ -24,7 +25,7 @@ public class NetworkManagerHelper : NetworkBehaviour
public void OnServerStart() public void OnServerStart()
{ {
// Spawn GameManager when the server starts // Spawn GameManager when the server starts
Debug.Log("Server started, spawning GameManager..."); GameLogger.Log("Server started, spawning GameManager...");
NetworkManager.ServerManager.Spawn(Instantiate(gameManagerPrefab).gameObject); NetworkManager.ServerManager.Spawn(Instantiate(gameManagerPrefab).gameObject);
} }
} }

View File

@ -59,7 +59,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 589090f78af84af396ccd5497a9740a1, type: 3} m_Shader: {fileID: 4800000, guid: 589090f78af84af396ccd5497a9740a1, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- VERTICAL_GRADIENT
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
@ -81,11 +82,15 @@ Material:
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _BorderSharpness: 1
- _BorderWidth: 1 - _BorderWidth: 1
- _ColorMask: 15 - _ColorMask: 15
- _CullMode: 0 - _CullMode: 0
- _GradientAngle: 90
- _GradientHeight: 12
- _MaskSoftnessX: 0 - _MaskSoftnessX: 0
- _MaskSoftnessY: 0 - _MaskSoftnessY: 0
- _PixelSize: 1
- _Stencil: 0 - _Stencil: 0
- _StencilComp: 8 - _StencilComp: 8
- _StencilOp: 0 - _StencilOp: 0
@ -93,9 +98,11 @@ Material:
- _StencilWriteMask: 255 - _StencilWriteMask: 255
- _VertexOffsetX: 0 - _VertexOffsetX: 0
- _VertexOffsetY: 0 - _VertexOffsetY: 0
- _VerticalGradient: 1
m_Colors: m_Colors:
- _BorderColor1: {r: 1, g: 0, b: 0, a: 1} - _BorderColor1: {r: 1, g: 0, b: 0, a: 1}
- _BorderColor2: {r: 0, g: 0, b: 1, a: 1} - _BorderColor2: {r: 0, g: 0, b: 1, a: 1}
- _CharacterSize: {r: 32, g: 32, b: 0, a: 0}
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} - _FaceColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []