Organize custom scripts under Assets/Baba_yaga and merge Opsive folders to Assets root

This commit is contained in:
2026-07-01 20:32:28 +07:00
parent 83d4157ac6
commit befc19bf37
5901 changed files with 243 additions and 141 deletions

View File

@@ -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": { &quot;keyToString&quot;: {
"ModuleVcsDetector.initialDetectionPerformed": "true", &quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
"RunOnceActivity.MCP Project settings loaded": "true", &quot;RunOnceActivity.MCP Project settings loaded&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", &quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
"RunOnceActivity.cidr.known.project.marker": "true", &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
"RunOnceActivity.git.unshallow": "true", &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
"RunOnceActivity.readMode.enableVisualFormatting": "true", &quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
"RunOnceActivity.typescript.service.memoryLimit.init": "true", &quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
"cidr.known.project.marker": "true", &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
"codeWithMe.voiceChat.enabledByDefault": "false", &quot;codeWithMe.voiceChat.enabledByDefault&quot;: &quot;false&quot;,
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true", &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
"git-widget-placeholder": "main", &quot;git-widget-placeholder&quot;: &quot;main&quot;,
"junie.onboarding.icon.badge.shown": "true", &quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"to.speed.mode.migration.done": "true", &quot;to.speed.mode.migration.done&quot;: &quot;true&quot;,
"vue.rearranger.settings.migration": "true" &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
} }
}]]></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" />

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 50a98954ba2a8c04884fd88ab24729d0 guid: a9b006dd8e14db24589de0c5dfc03af6
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -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;

View File

@@ -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; }

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a9e4195e8593cb94caf06dc47798a7d8 guid: 1f390a3d7b8c9eb49ac7d779c08ef5f5
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 873cd6296aed2e7468f9f46127b19e9b guid: 962e9e0d2b8d78d4fbb25fb03224f618
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bf12c234e065e734fbf54c17a3e71540 guid: 1a38893b1d8574b45bce269c39824bd6
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -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;

View File

@@ -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.

View File

@@ -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

View File

@@ -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)")]

View File

@@ -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")]

View File

@@ -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")]

View File

@@ -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;

View File

@@ -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
{ {

View File

@@ -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>

View File

@@ -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.

View File

@@ -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

View File

@@ -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; }

View File

@@ -3,15 +3,17 @@ 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
{ {
public enum AlgorithmType { Recursive, Wilsons, Prims, Crawler, NoiseRecursive } [UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
public enum AlgorithmType { Recursive, Wilsons, Prims, Crawler, NoiseRecursive }
[BoxGroup("Generation")] [BoxGroup("Generation")]
[InfoBox("Set the array size to control how many maze floors are generated. Runtime grid data is rebuilt when Regenerate runs.")] [InfoBox("Set the array size to control how many maze floors are generated. Runtime grid data is rebuilt when Regenerate runs.")]

View File

@@ -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,7 +23,8 @@ namespace Hallucinate.GameSetup.Maze
public float Scale => visualProfile != null ? visualProfile.scale : 1f; public float Scale => visualProfile != null ? visualProfile.scale : 1f;
public enum CellAnimationType { None, ScaleUp, DropDown, SpinIn } [UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.GameSetup.Maze", sourceAssembly: "Opsive.UltimateCharacterController")]
public enum CellAnimationType { None, ScaleUp, DropDown, SpinIn }
[HideInInspector] [HideInInspector]
public CellAnimationType currentAnimationType = CellAnimationType.ScaleUp; public CellAnimationType currentAnimationType = CellAnimationType.ScaleUp;

View File

@@ -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")]

View File

@@ -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";

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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; }

View File

@@ -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) {

View File

@@ -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);
} }

View File

@@ -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; }

View File

@@ -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; }
@@ -33,19 +34,15 @@ 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>(); // In a real scenario, we might push a new Result screen
if (hud != null) // For now, let's assume HUD has a result panel
{ Debug.Log($"RESULT: {(isWin ? "WIN" : "LOSS")} | Delta: {delta} | New Rating: {newRating}");
// In a real scenario, we might push a new Result screen
// For now, let's assume HUD has a result panel // Save to PlayerPrefs as a dummy "Server" persistence
Debug.Log($"RESULT: {(isWin ? "WIN" : "LOSS")} | Delta: {delta} | New Rating: {newRating}"); PlayerPrefs.SetInt("EloRating", newRating);
int gamesPlayed = PlayerPrefs.GetInt("GamesPlayed", 0);
// Save to PlayerPrefs as a dummy "Server" persistence PlayerPrefs.SetInt("GamesPlayed", gamesPlayed + 1);
PlayerPrefs.SetInt("EloRating", newRating); PlayerPrefs.Save();
int gamesPlayed = PlayerPrefs.GetInt("GamesPlayed", 0);
PlayerPrefs.SetInt("GamesPlayed", gamesPlayed + 1);
PlayerPrefs.Save();
}
} }
public void ProcessMatchEnd(PlayerRef winner) public void ProcessMatchEnd(PlayerRef winner)

View File

@@ -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
View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 91b95b0bf23143b68483f912b558e6f0
timeCreated: 1773383929

View File

@@ -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