[Refactor] Add folder-based namespaces to all C# scripts
Wrap all 39 scripts and 6 test files in namespaces matching their folder structure (e.g. Assets/Scripts/Dice/ → YachtDice.Dice). Add cross-namespace using directives where types are referenced across modules. Set rootNamespace in both .asmdef files (YachtDice, YachtDice.Tests). Namespace mapping: - YachtDice.Dice — Dice, DiceRoller - YachtDice.Economy — CurrencyBank - YachtDice.Game — GameManager, DiceManager, DebugGameInput - YachtDice.Inventory — InventoryController/Model/SlotView/View - YachtDice.Modifiers — ModifierData/Effect/Enums/Pipeline/Runtime/Target - YachtDice.Persistence — SaveData, SaveSystem - YachtDice.Scoring — CategoryScorer, ScoreResult, ScoringSystem, YachtCategory - YachtDice.Shop — ShopCatalog/Controller/ItemView/Model/View - YachtDice.UI — CategoryRowView, DicePanelView, GameController, GameInfoView, ScoreCardView - YachtDice.Editor — ModifierAssetCreator - YachtDice.Tests — all test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,10 @@ using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using YachtDice.Scoring;
|
||||
|
||||
namespace YachtDice.UI
|
||||
{
|
||||
|
||||
public sealed class CategoryRowView : MonoBehaviour
|
||||
{
|
||||
@@ -87,3 +91,4 @@ public sealed class CategoryRowView : MonoBehaviour
|
||||
selectButton.onClick.RemoveListener(HandleClick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
namespace YachtDice.UI
|
||||
{
|
||||
|
||||
public sealed class DicePanelView : MonoBehaviour
|
||||
{
|
||||
[Header("Dice Display")]
|
||||
@@ -99,3 +102,4 @@ public sealed class DicePanelView : MonoBehaviour
|
||||
rollButton.onClick.RemoveAllListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using YachtDice.Game;
|
||||
using YachtDice.Scoring;
|
||||
using YachtDice.Economy;
|
||||
using YachtDice.Shop;
|
||||
using YachtDice.Inventory;
|
||||
using YachtDice.Persistence;
|
||||
using YachtDice.Modifiers;
|
||||
|
||||
namespace YachtDice.UI
|
||||
{
|
||||
|
||||
public sealed class GameController : MonoBehaviour
|
||||
{
|
||||
@@ -345,3 +355,4 @@ public sealed class GameController : MonoBehaviour
|
||||
return total;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
namespace YachtDice.UI
|
||||
{
|
||||
|
||||
public sealed class GameInfoView : MonoBehaviour
|
||||
{
|
||||
[Header("Turn Info")]
|
||||
@@ -67,3 +70,4 @@ public sealed class GameInfoView : MonoBehaviour
|
||||
inventoryButton.onClick.RemoveAllListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using YachtDice.Scoring;
|
||||
|
||||
namespace YachtDice.UI
|
||||
{
|
||||
|
||||
public sealed class ScoreCardView : MonoBehaviour
|
||||
{
|
||||
@@ -107,3 +111,4 @@ public sealed class ScoreCardView : MonoBehaviour
|
||||
categoryRows[i].OnCategorySelected -= HandleCategorySelected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user