[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:
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace YachtDice.Scoring
|
||||
{
|
||||
|
||||
public static class CategoryScorer
|
||||
{
|
||||
public static int Calculate(int[] dice, YachtCategory category)
|
||||
@@ -77,3 +80,4 @@ public static class CategoryScorer
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YachtDice.Scoring
|
||||
{
|
||||
|
||||
[Serializable]
|
||||
public struct ScoreResult
|
||||
{
|
||||
@@ -24,3 +27,4 @@ public struct ScoreResult
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using YachtDice.Modifiers;
|
||||
|
||||
namespace YachtDice.Scoring
|
||||
{
|
||||
|
||||
public sealed class ScoringSystem : MonoBehaviour
|
||||
{
|
||||
@@ -82,3 +86,4 @@ public sealed class ScoringSystem : MonoBehaviour
|
||||
usedCategories.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
namespace YachtDice.Scoring
|
||||
{
|
||||
public enum YachtCategory
|
||||
{
|
||||
// Upper Section
|
||||
@@ -17,3 +19,4 @@ public enum YachtCategory
|
||||
Yacht,
|
||||
Chance
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user