hch
1 天以前 89fa96e505af9fe7baf676591222bfdb23b48262
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections.Generic;
 
public partial class PhantasmPavilionManager : GameSystemManager<PhantasmPavilionManager>
{
    readonly public Dictionary<PhantasmPavilionType, IPhantasmPavilionHandler> handlers = new Dictionary<PhantasmPavilionType, IPhantasmPavilionHandler>()
    {
        { PhantasmPavilionType.Face, new PhantasmPavilionFaceHandler() },
        { PhantasmPavilionType.FacePic, new PhantasmPavilionFacePicHandler() },
        { PhantasmPavilionType.ChatBox, new PhantasmPavilionChatBoxHandler() },
        { PhantasmPavilionType.Title, new PhantasmPavilionTitleHandler() },
        { PhantasmPavilionType.Model, new PhantasmPavilionModelHandler() },
    };
    public bool TryGetHandlerValue(PhantasmPavilionType type, out IPhantasmPavilionHandler handler)
    {
        return handlers.TryGetValue(type, out handler);
    }
 
    // 一行展示x个物品
    public readonly Dictionary<PhantasmPavilionType, int> rowCountMaxDict = new Dictionary<PhantasmPavilionType, int>()
    {
     {PhantasmPavilionType.Face, 4},
     {PhantasmPavilionType.FacePic, 4},
     {PhantasmPavilionType.ChatBox, 3},
     {PhantasmPavilionType.Title, 3},
     {PhantasmPavilionType.Model, 5},
    };
 
    public bool TryGetRowCountMax(PhantasmPavilionType type, out int rowCountMax)
    {
        return rowCountMaxDict.TryGetValue(type, out rowCountMax);
    }
}