Organize custom scripts under Assets/Baba_yaga and merge Opsive folders to Assets root
This commit is contained in:
55
.idea/.idea.BABA_YAGA/.idea/workspace.xml
generated
55
.idea/.idea.BABA_YAGA/.idea/workspace.xml
generated
@@ -7,14 +7,7 @@
|
|||||||
<configurations />
|
<configurations />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="d308d1cb-09fc-4331-ba20-00f7b43d1576" name="Changes" comment="">
|
<list default="true" id="d308d1cb-09fc-4331-ba20-00f7b43d1576" name="Changes" comment="" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.BABA_YAGA/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.BABA_YAGA/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/Nolan/Nolan.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Prefabs/Nolan/Nolan.prefab" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/Player Prototype/PlayerDataManager.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Prefabs/Player Prototype/PlayerDataManager.prefab" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Network/FusionClientMovementBridge.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Network/FusionClientMovementBridge.cs" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/ProjectSettings/UnityConnectSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/UnityConnectSettings.asset" afterDir="false" />
|
|
||||||
</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" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -52,30 +45,30 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.MCP Project settings loaded": "true",
|
"RunOnceActivity.MCP Project settings loaded": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
||||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"cidr.known.project.marker": "true",
|
"cidr.known.project.marker": "true",
|
||||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||||
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
|
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"junie.onboarding.icon.badge.shown": "true",
|
"junie.onboarding.icon.badge.shown": "true",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"to.speed.mode.migration.done": "true",
|
"to.speed.mode.migration.done": "true",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||||
<configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable">
|
<configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Build\BABA_YAGA.exe" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/Build\BABA_YAGA.exe" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 50a98954ba2a8c04884fd88ab24729d0
|
guid: a9b006dd8e14db24589de0c5dfc03af6
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -2,8 +2,9 @@ using UnityEngine;
|
|||||||
using TMPro;
|
using TMPro;
|
||||||
using PrimeTween;
|
using PrimeTween;
|
||||||
|
|
||||||
namespace Hallucinate.UI
|
namespace Baba_yaga.UI
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.UI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class ChatBubble : MonoBehaviour
|
public class ChatBubble : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private TextMeshProUGUI textDisplay;
|
[SerializeField] private TextMeshProUGUI textDisplay;
|
||||||
@@ -4,20 +4,25 @@ using System.Text;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
namespace Hallucinate.AI
|
namespace Baba_yaga.AI
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.AI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class Part { public string text; }
|
public class Part { public string text; }
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.AI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class Content { public Part[] parts; }
|
public class Content { public Part[] parts; }
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.AI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class Candidate { public Content content; }
|
public class Candidate { public Content content; }
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.AI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class GeminiResponse { public Candidate[] candidates; }
|
public class GeminiResponse { public Candidate[] candidates; }
|
||||||
|
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.AI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class GeminiService : MonoBehaviour
|
public class GeminiService : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static GeminiService Instance { get; private set; }
|
public static GeminiService Instance { get; private set; }
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a9e4195e8593cb94caf06dc47798a7d8
|
guid: 1f390a3d7b8c9eb49ac7d779c08ef5f5
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 873cd6296aed2e7468f9f46127b19e9b
|
guid: 962e9e0d2b8d78d4fbb25fb03224f618
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: bf12c234e065e734fbf54c17a3e71540
|
guid: 1a38893b1d8574b45bce269c39824bd6
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using Fusion;
|
using Fusion;
|
||||||
|
|
||||||
namespace Hallucinate.Game
|
namespace Baba_yaga.Game
|
||||||
{
|
{
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.Game", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public struct PlayerEloData
|
public struct PlayerEloData
|
||||||
{
|
{
|
||||||
public int Rating;
|
public int Rating;
|
||||||
@@ -17,6 +18,7 @@ namespace Hallucinate.Game
|
|||||||
public static PlayerEloData Default => new PlayerEloData(1000, 0);
|
public static PlayerEloData Default => new PlayerEloData(1000, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.Game", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public struct EloResult : INetworkStruct
|
public struct EloResult : INetworkStruct
|
||||||
{
|
{
|
||||||
public int NewRatingA;
|
public int NewRatingA;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.Game
|
namespace Baba_yaga.Game
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pure logic for Elo rating calculations.
|
/// Pure logic for Elo rating calculations.
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
using Fusion;
|
using Fusion;
|
||||||
using Hallucinate.Game;
|
using Baba_yaga.Game;
|
||||||
using Hallucinate.UI;
|
using Baba_yaga.UI;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.Network
|
namespace Baba_yaga.Network
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Orchestrates the Elo calculation and persistence on the Host.
|
/// Orchestrates the Elo calculation and persistence on the Host.
|
||||||
/// Broadcasts results to all clients.
|
/// Broadcasts results to all clients.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.Network", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MatchEloManager : NetworkBehaviour
|
public class MatchEloManager : NetworkBehaviour
|
||||||
{
|
{
|
||||||
[Networked] public EloResult LastMatchResult { get; set; }
|
[Networked] public EloResult LastMatchResult { get; set; }
|
||||||
@@ -18,6 +19,25 @@ namespace Hallucinate.Network
|
|||||||
|
|
||||||
private Dictionary<PlayerRef, string> _playerUsernames = new Dictionary<PlayerRef, string>();
|
private Dictionary<PlayerRef, string> _playerUsernames = new Dictionary<PlayerRef, string>();
|
||||||
|
|
||||||
|
// Simulating the database locally instead of Firebase
|
||||||
|
private static Dictionary<string, PlayerEloData> _localEloDatabase = new Dictionary<string, PlayerEloData>();
|
||||||
|
|
||||||
|
private Task<PlayerEloData> GetLocalPlayerData(string username)
|
||||||
|
{
|
||||||
|
if (!_localEloDatabase.TryGetValue(username, out var data))
|
||||||
|
{
|
||||||
|
data = PlayerEloData.Default;
|
||||||
|
_localEloDatabase[username] = data;
|
||||||
|
}
|
||||||
|
return Task.FromResult(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task SaveLocalPlayerData(string username, PlayerEloData data)
|
||||||
|
{
|
||||||
|
_localEloDatabase[username] = data;
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Spawned()
|
public override void Spawned()
|
||||||
{
|
{
|
||||||
if (Object.HasStateAuthority)
|
if (Object.HasStateAuthority)
|
||||||
@@ -53,9 +73,9 @@ namespace Hallucinate.Network
|
|||||||
string nameA = _playerUsernames.GetValueOrDefault(winner, "Unknown_A");
|
string nameA = _playerUsernames.GetValueOrDefault(winner, "Unknown_A");
|
||||||
string nameB = _playerUsernames.GetValueOrDefault(loser, "Unknown_B");
|
string nameB = _playerUsernames.GetValueOrDefault(loser, "Unknown_B");
|
||||||
|
|
||||||
// 1. Fetch from Firebase
|
// 1. Fetch from local simulated database
|
||||||
var dataA = await FirebaseService.GetPlayerData(nameA);
|
var dataA = await GetLocalPlayerData(nameA);
|
||||||
var dataB = await FirebaseService.GetPlayerData(nameB);
|
var dataB = await GetLocalPlayerData(nameB);
|
||||||
|
|
||||||
// 2. Calculate
|
// 2. Calculate
|
||||||
float resultA = isDraw ? 0.5f : 1.0f;
|
float resultA = isDraw ? 0.5f : 1.0f;
|
||||||
@@ -68,10 +88,10 @@ namespace Hallucinate.Network
|
|||||||
dataB.Rating = result.NewRatingB;
|
dataB.Rating = result.NewRatingB;
|
||||||
dataB.GamesPlayed++;
|
dataB.GamesPlayed++;
|
||||||
|
|
||||||
// 4. Save to Firebase
|
// 4. Save to local simulated database
|
||||||
await Task.WhenAll(
|
await Task.WhenAll(
|
||||||
FirebaseService.SavePlayerData(nameA, dataA),
|
SaveLocalPlayerData(nameA, dataA),
|
||||||
FirebaseService.SavePlayerData(nameB, dataB)
|
SaveLocalPlayerData(nameB, dataB)
|
||||||
);
|
);
|
||||||
|
|
||||||
// 5. Broadcast
|
// 5. Broadcast
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OnlyScove.Scripts.GameSetup
|
namespace Baba_yaga.GameSetup
|
||||||
{
|
{
|
||||||
[RequireComponent(typeof(CharacterController))]
|
[RequireComponent(typeof(CharacterController))]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "OnlyScove.Scripts.GameSetup", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class CharacterAutoSetup : MonoBehaviour
|
public class CharacterAutoSetup : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("Manual Overrides (If Detection Fails)")]
|
[Header("Manual Overrides (If Detection Fails)")]
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace OnlyScove.Scripts.GameSetup
|
namespace Baba_yaga.GameSetup
|
||||||
{
|
{
|
||||||
[CreateAssetMenu(fileName = "CharacterSetupSettings", menuName = "BABA_YAGA/Setup/Character Setup Settings")]
|
[CreateAssetMenu(fileName = "CharacterSetupSettings", menuName = "BABA_YAGA/Setup/Character Setup Settings")]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "OnlyScove.Scripts.GameSetup", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class CharacterSetupSettings : ScriptableObject
|
public class CharacterSetupSettings : ScriptableObject
|
||||||
{
|
{
|
||||||
[Header("Movement Constraints")]
|
[Header("Movement Constraints")]
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace OnlyScove.Scripts
|
namespace Baba_yaga
|
||||||
{
|
{
|
||||||
[CreateAssetMenu(fileName = "GameSettings", menuName = "BABA_YAGA/Settings/GameSettings")]
|
[CreateAssetMenu(fileName = "GameSettings", menuName = "BABA_YAGA/Settings/GameSettings")]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "OnlyScove.Scripts", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class GameSettings : ScriptableObject
|
public class GameSettings : ScriptableObject
|
||||||
{
|
{
|
||||||
[BoxGroup("Camera")]
|
[BoxGroup("Camera")]
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class CrawlerAlgorithm : IMazeAlgorithm
|
public class CrawlerAlgorithm : IMazeAlgorithm
|
||||||
{
|
{
|
||||||
private const int CrawlChance = 50;
|
private const int CrawlChance = 50;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze.Extensions
|
namespace Baba_yaga.GameSetup.Maze.Extensions
|
||||||
{
|
{
|
||||||
public static class ListExtensions
|
public static class ListExtensions
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for all maze generation algorithms.
|
/// Interface for all maze generation algorithms.
|
||||||
/// Supports both immediate and step-by-step (animated) generation.
|
/// Supports both immediate and step-by-step (animated) generation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public interface IMazeAlgorithm
|
public interface IMazeAlgorithm
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a 2D coordinate on the maze grid.
|
/// Represents a 2D coordinate on the maze grid.
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the state of each cell in the maze.
|
/// Defines the state of each cell in the maze.
|
||||||
/// Used to replace magic numbers and drive visual changes.
|
/// Used to replace magic numbers and drive visual changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public enum MazeCellType
|
public enum MazeCellType
|
||||||
{
|
{
|
||||||
Wall, // Solid block
|
Wall, // Solid block
|
||||||
@@ -18,6 +19,7 @@ namespace Hallucinate.GameSetup.Maze
|
|||||||
StairsDown,
|
StairsDown,
|
||||||
Room
|
Room
|
||||||
}
|
}
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public enum PieceType
|
public enum PieceType
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
@@ -30,6 +32,7 @@ namespace Hallucinate.GameSetup.Maze
|
|||||||
Stairs,
|
Stairs,
|
||||||
StairsUp// Cầu thang (Điểm nối)
|
StairsUp// Cầu thang (Điểm nối)
|
||||||
}
|
}
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public struct MazePieceData
|
public struct MazePieceData
|
||||||
{
|
{
|
||||||
public PieceType piece; // Hình dạng mảnh ghép
|
public PieceType piece; // Hình dạng mảnh ghép
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Holds the logical state of the maze grid.
|
/// Holds the logical state of the maze grid.
|
||||||
/// Notifies listeners whenever a cell changes to trigger visual updates.
|
/// Notifies listeners whenever a cell changes to trigger visual updates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MazeGrid
|
public class MazeGrid
|
||||||
{
|
{
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
@@ -3,14 +3,16 @@ using System.Collections.Generic;
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Central controller for the Maze system.
|
/// Central controller for the Maze system.
|
||||||
/// Manages algorithm selection, debug speed, and regeneration.
|
/// Manages algorithm selection, debug speed, and regeneration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MazeManager : MonoBehaviour
|
public class MazeManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public enum AlgorithmType { Recursive, Wilsons, Prims, Crawler, NoiseRecursive }
|
public enum AlgorithmType { Recursive, Wilsons, Prims, Crawler, NoiseRecursive }
|
||||||
|
|
||||||
[BoxGroup("Generation")]
|
[BoxGroup("Generation")]
|
||||||
@@ -3,12 +3,13 @@ using System.Collections.Generic;
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responsible for the visual representation of the maze.
|
/// Responsible for the visual representation of the maze.
|
||||||
/// Handles spawning, pooling, and animations with safety checks.
|
/// Handles spawning, pooling, and animations with safety checks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MazeRenderer : MonoBehaviour
|
public class MazeRenderer : MonoBehaviour
|
||||||
{
|
{
|
||||||
[BoxGroup("Visuals")]
|
[BoxGroup("Visuals")]
|
||||||
@@ -22,6 +23,7 @@ namespace Hallucinate.GameSetup.Maze
|
|||||||
|
|
||||||
public float Scale => visualProfile != null ? visualProfile.scale : 1f;
|
public float Scale => visualProfile != null ? visualProfile.scale : 1f;
|
||||||
|
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public enum CellAnimationType { None, ScaleUp, DropDown, SpinIn }
|
public enum CellAnimationType { None, ScaleUp, DropDown, SpinIn }
|
||||||
|
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
[CreateAssetMenu(fileName = "MazeVisualProfile", menuName = "BABA_YAGA/Maze/Visual Profile")]
|
[CreateAssetMenu(fileName = "MazeVisualProfile", menuName = "BABA_YAGA/Maze/Visual Profile")]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MazeVisualProfile : ScriptableObject
|
public class MazeVisualProfile : ScriptableObject
|
||||||
{
|
{
|
||||||
[BoxGroup("Rotation Offsets")]
|
[BoxGroup("Rotation Offsets")]
|
||||||
@@ -2,8 +2,9 @@ using System;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze.Native
|
namespace Baba_yaga.GameSetup.Maze.Native
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze.Native", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class NativeNoiseProvider : IDisposable
|
public class NativeNoiseProvider : IDisposable
|
||||||
{
|
{
|
||||||
private const string DLL_NAME = "BackroomsNoise";
|
private const string DLL_NAME = "BackroomsNoise";
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Hallucinate.GameSetup.Maze.Extensions;
|
using Baba_yaga.GameSetup.Maze.Extensions;
|
||||||
using Hallucinate.GameSetup.Maze.Native;
|
using Baba_yaga.GameSetup.Maze.Native;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Advanced generator that combines C++ Native Noise with a Recursive Backtracking algorithm.
|
/// Advanced generator that combines C++ Native Noise with a Recursive Backtracking algorithm.
|
||||||
/// Creates a hybrid layout of large rooms and chaotic corridors.
|
/// Creates a hybrid layout of large rooms and chaotic corridors.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class NoiseRecursiveGenerator : IMazeAlgorithm
|
public class NoiseRecursiveGenerator : IMazeAlgorithm
|
||||||
{
|
{
|
||||||
private readonly List<MapLocation> _directions = MapLocation.Directions;
|
private readonly List<MapLocation> _directions = MapLocation.Directions;
|
||||||
@@ -2,8 +2,9 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class PrimsAlgorithm : IMazeAlgorithm
|
public class PrimsAlgorithm : IMazeAlgorithm
|
||||||
{
|
{
|
||||||
private const int InitialX = 2;
|
private const int InitialX = 2;
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Hallucinate.GameSetup.Maze.Extensions;
|
using Baba_yaga.GameSetup.Maze.Extensions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class RecursiveAlgorithm : IMazeAlgorithm
|
public class RecursiveAlgorithm : IMazeAlgorithm
|
||||||
{
|
{
|
||||||
private const int StartX = 5;
|
private const int StartX = 5;
|
||||||
@@ -2,12 +2,13 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Hallucinate.GameSetup.Maze
|
namespace Baba_yaga.GameSetup.Maze
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wilson's Algorithm implementation based on the original provided logic.
|
/// Wilson's Algorithm implementation based on the original provided logic.
|
||||||
/// Ensures paths are sparse and correctly finalized using specific neighbor constraints.
|
/// Ensures paths are sparse and correctly finalized using specific neighbor constraints.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class WilsonsAlgorithm : IMazeAlgorithm
|
public class WilsonsAlgorithm : IMazeAlgorithm
|
||||||
{
|
{
|
||||||
private const int MinBoundary = 2;
|
private const int MinBoundary = 2;
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace OnlyScove.Scripts
|
namespace Baba_yaga
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "OnlyScove.Scripts", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class SettingsManager : MonoBehaviour
|
public class SettingsManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static SettingsManager Instance { get; private set; }
|
public static SettingsManager Instance { get; private set; }
|
||||||
@@ -18,7 +18,7 @@ public class GameManager : NetworkBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[SerializeField] private Hallucinate.Network.MatchEloManager eloManager;
|
[SerializeField] private Baba_yaga.Network.MatchEloManager eloManager;
|
||||||
|
|
||||||
public void TriggerGameOver(PlayerRef winner, PlayerRef loser, bool isDraw = false) {
|
public void TriggerGameOver(PlayerRef winner, PlayerRef loser, bool isDraw = false) {
|
||||||
if (!isGameOver) {
|
if (!isGameOver) {
|
||||||
@@ -5,10 +5,11 @@ using System.Threading.Tasks;
|
|||||||
using Fusion;
|
using Fusion;
|
||||||
using Fusion.Sockets;
|
using Fusion.Sockets;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using OnlyScove.Scripts;
|
using Baba_yaga;
|
||||||
|
|
||||||
namespace Hallucinate.UI
|
namespace Baba_yaga.UI
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.UI", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
|
public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
|
||||||
{
|
{
|
||||||
private static BasicSpawner _instance;
|
private static BasicSpawner _instance;
|
||||||
@@ -400,9 +401,9 @@ namespace Hallucinate.UI
|
|||||||
public void OnInput(NetworkRunner runner, NetworkInput input)
|
public void OnInput(NetworkRunner runner, NetworkInput input)
|
||||||
{
|
{
|
||||||
var data = new PlayerInputData();
|
var data = new PlayerInputData();
|
||||||
if (Hallucinate.Network.FusionClientMovementBridge.Local != null)
|
if (Baba_yaga.Network.FusionClientMovementBridge.Local != null)
|
||||||
{
|
{
|
||||||
data = Hallucinate.Network.FusionClientMovementBridge.Local.GetLocalInputData();
|
data = Baba_yaga.Network.FusionClientMovementBridge.Local.GetLocalInputData();
|
||||||
}
|
}
|
||||||
input.Set(data);
|
input.Set(data);
|
||||||
}
|
}
|
||||||
@@ -8,12 +8,13 @@ using Opsive.UltimateCharacterController.Character.Abilities;
|
|||||||
using Opsive.UltimateCharacterController.Character.Abilities.Items;
|
using Opsive.UltimateCharacterController.Character.Abilities.Items;
|
||||||
using Opsive.UltimateCharacterController.Camera;
|
using Opsive.UltimateCharacterController.Camera;
|
||||||
using Opsive.UltimateCharacterController.Input;
|
using Opsive.UltimateCharacterController.Input;
|
||||||
using OnlyScove.Scripts;
|
using Baba_yaga;
|
||||||
using Opsive.UltimateCharacterController.Game;
|
using Opsive.UltimateCharacterController.Game;
|
||||||
namespace Hallucinate.Network
|
namespace Baba_yaga.Network
|
||||||
{
|
{
|
||||||
// Ensure Opsive components load before this
|
// Ensure Opsive components load before this
|
||||||
[DefaultExecutionOrder(100)]
|
[DefaultExecutionOrder(100)]
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.Network", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class FusionClientMovementBridge : NetworkBehaviour, INetworkInfo, INetworkCharacter, ILookSource
|
public class FusionClientMovementBridge : NetworkBehaviour, INetworkInfo, INetworkCharacter, ILookSource
|
||||||
{
|
{
|
||||||
public static FusionClientMovementBridge Local { get; private set; }
|
public static FusionClientMovementBridge Local { get; private set; }
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
using Fusion;
|
using Fusion;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Hallucinate.Game;
|
using Baba_yaga.Game;
|
||||||
using Hallucinate.UI;
|
using Baba_yaga.UI;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Hallucinate.Network
|
namespace Baba_yaga.Network
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.Network", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public class MatchResultManager : NetworkBehaviour
|
public class MatchResultManager : NetworkBehaviour
|
||||||
{
|
{
|
||||||
public static MatchResultManager Instance { get; private set; }
|
public static MatchResultManager Instance { get; private set; }
|
||||||
@@ -32,9 +33,6 @@ namespace Hallucinate.Network
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ShowResultUI(bool isWin, int delta, int newRating)
|
private void ShowResultUI(bool isWin, int delta, int newRating)
|
||||||
{
|
|
||||||
var hud = FindFirstObjectByType<HUDController>();
|
|
||||||
if (hud != null)
|
|
||||||
{
|
{
|
||||||
// In a real scenario, we might push a new Result screen
|
// In a real scenario, we might push a new Result screen
|
||||||
// For now, let's assume HUD has a result panel
|
// For now, let's assume HUD has a result panel
|
||||||
@@ -46,7 +44,6 @@ namespace Hallucinate.Network
|
|||||||
PlayerPrefs.SetInt("GamesPlayed", gamesPlayed + 1);
|
PlayerPrefs.SetInt("GamesPlayed", gamesPlayed + 1);
|
||||||
PlayerPrefs.Save();
|
PlayerPrefs.Save();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void ProcessMatchEnd(PlayerRef winner)
|
public void ProcessMatchEnd(PlayerRef winner)
|
||||||
{
|
{
|
||||||
@@ -2,8 +2,9 @@
|
|||||||
using Fusion;
|
using Fusion;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace OnlyScove.Scripts
|
namespace Baba_yaga
|
||||||
{
|
{
|
||||||
|
[UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "OnlyScove.Scripts", sourceAssembly: "Opsive.UltimateCharacterController")]
|
||||||
public struct PlayerInputData : INetworkInput, INetworkStruct
|
public struct PlayerInputData : INetworkInput, INetworkStruct
|
||||||
{
|
{
|
||||||
// Di chuyển (thường là Vector2 cho X/Y hoặc WASD)
|
// Di chuyển (thường là Vector2 cho X/Y hoặc WASD)
|
||||||
3
Assets/Baba_yaga/UI.meta
Normal file
3
Assets/Baba_yaga/UI.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 91b95b0bf23143b68483f912b558e6f0
|
||||||
|
timeCreated: 1773383929
|
||||||
@@ -6,7 +6,7 @@ using DG.Tweening;
|
|||||||
using Tween = PrimeTween.Tween;
|
using Tween = PrimeTween.Tween;
|
||||||
using Ease = PrimeTween.Ease;
|
using Ease = PrimeTween.Ease;
|
||||||
|
|
||||||
namespace Hallucinate.UI
|
namespace Baba_yaga.UI
|
||||||
{
|
{
|
||||||
public abstract class BaseUIController : ScriptableObject
|
public abstract class BaseUIController : ScriptableObject
|
||||||
{
|
{
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user