【图鉴】NPC
parent
ffbe9510ea
commit
a9025fdd55
File diff suppressed because it is too large
Load Diff
|
|
@ -1654,7 +1654,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5451765420416057613
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -2061,9 +2061,9 @@ RectTransform:
|
|||
- {fileID: 6992835488703964799}
|
||||
m_Father: {fileID: 4984012850216977606}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 547.105, y: -73.3}
|
||||
m_SizeDelta: {x: 232, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &359173789629031393
|
||||
|
|
@ -2529,9 +2529,9 @@ RectTransform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 4984012850216977606}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 666.105, y: -73.3}
|
||||
m_SizeDelta: {x: 6, y: 48}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4639158310958151519
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7ca34495fd58dc64fbfa2caa6e30fa7b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -320,6 +320,7 @@ public partial class UIManager
|
|||
_WindowMeta(UINameConst.UI_Character, UICanvasLayer.Normal, UIVisibilityStrategy.Occlusion, true, true, needScreenshot: true);
|
||||
_WindowMeta(UINameConst.UI_NPC, UICanvasLayer.Normal, UIVisibilityStrategy.Occlusion, true, true, needScreenshot: true);
|
||||
_WindowMeta(UINameConst.UI_EnemyCharacter, UICanvasLayer.Normal, UIVisibilityStrategy.Occlusion, true, true, needScreenshot: true);
|
||||
_WindowMeta(UINameConst.UI_NPCInfo, UICanvasLayer.Normal, UIVisibilityStrategy.Occlusion, true, true, needScreenshot: true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -910,4 +911,5 @@ public static class UINameConst
|
|||
public static readonly string UI_Character = "Camp/UI_Character";
|
||||
public static readonly string UI_NPC = "Camp/UI_NPC";
|
||||
public static readonly string UI_EnemyCharacter = "Camp/UI_EnemyCharacter";
|
||||
public static readonly string UI_NPCInfo = "Camp/UI_NPCInfo";
|
||||
}
|
||||
|
|
@ -23,15 +23,15 @@ public sealed partial class DataCharacterPersonalFiles : Luban.BeanBase
|
|||
{ if(!_buf["RoleID"].IsNumber) { throw new SerializationException(); } RoleID = _buf["RoleID"]; }
|
||||
{ if(!_buf["ParagraphID"].IsNumber) { throw new SerializationException(); } ParagraphID = _buf["ParagraphID"]; }
|
||||
{ if(!_buf["ParagraphText"].IsString) { throw new SerializationException(); } ParagraphText = _buf["ParagraphText"]; }
|
||||
{ if(!_buf["Unlocks"].IsString) { throw new SerializationException(); } Unlocks = _buf["Unlocks"]; }
|
||||
{ var __json0 = _buf["UnlockByLevel"]; if(!__json0.IsArray) { throw new SerializationException(); } UnlockByLevel = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } UnlockByLevel.Add(__v0); } }
|
||||
}
|
||||
|
||||
public DataCharacterPersonalFiles(int RoleID, int ParagraphID, string ParagraphText, string Unlocks )
|
||||
public DataCharacterPersonalFiles(int RoleID, int ParagraphID, string ParagraphText, System.Collections.Generic.List<int> UnlockByLevel )
|
||||
{
|
||||
this.RoleID = RoleID;
|
||||
this.ParagraphID = ParagraphID;
|
||||
this.ParagraphText = ParagraphText;
|
||||
this.Unlocks = Unlocks;
|
||||
this.UnlockByLevel = UnlockByLevel;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -53,9 +53,9 @@ public sealed partial class DataCharacterPersonalFiles : Luban.BeanBase
|
|||
/// </summary>
|
||||
public string ParagraphText { get; private set; }
|
||||
/// <summary>
|
||||
/// 解锁条件
|
||||
/// 解锁条件(关卡)
|
||||
/// </summary>
|
||||
public string Unlocks { get; private set; }
|
||||
public System.Collections.Generic.List<int> UnlockByLevel { get; private set; }
|
||||
|
||||
public const int __ID__ = -1505985269;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
|
@ -70,7 +70,7 @@ public sealed partial class DataCharacterPersonalFiles : Luban.BeanBase
|
|||
+ "RoleID:" + RoleID + ","
|
||||
+ "ParagraphID:" + ParagraphID + ","
|
||||
+ "ParagraphText:" + ParagraphText + ","
|
||||
+ "Unlocks:" + Unlocks + ","
|
||||
+ "UnlockByLevel:" + Luban.StringUtil.CollectionToString(UnlockByLevel) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
namespace cfg.CharacterCfg
|
||||
{
|
||||
public sealed partial class DataNPCConfig : Luban.BeanBase
|
||||
{
|
||||
public JSONNode cacheJsonNode {get; private set;}
|
||||
|
||||
public DataNPCConfig(JSONNode _buf)
|
||||
{
|
||||
cacheJsonNode = _buf;
|
||||
{ if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; }
|
||||
{ if(!_buf["RoleName"].IsString) { throw new SerializationException(); } RoleName = _buf["RoleName"]; }
|
||||
{ if(!_buf["RoleNickName"].IsString) { throw new SerializationException(); } RoleNickName = _buf["RoleNickName"]; }
|
||||
{ var __json0 = _buf["UnlockByLevel"]; if(!__json0.IsArray) { throw new SerializationException(); } UnlockByLevel = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } UnlockByLevel.Add(__v0); } }
|
||||
{ if(!_buf["Region"].IsNumber) { throw new SerializationException(); } Region = (CharacterCfg.ERegion)_buf["Region"].AsInt; }
|
||||
{ if(!_buf["HeadIcon"].IsString) { throw new SerializationException(); } HeadIcon = _buf["HeadIcon"]; }
|
||||
{ if(!_buf["Model"].IsString) { throw new SerializationException(); } Model = _buf["Model"]; }
|
||||
}
|
||||
|
||||
public DataNPCConfig(int ID, string RoleName, string RoleNickName, System.Collections.Generic.List<int> UnlockByLevel, CharacterCfg.ERegion Region, string HeadIcon, string Model )
|
||||
{
|
||||
this.ID = ID;
|
||||
this.RoleName = RoleName;
|
||||
this.RoleNickName = RoleNickName;
|
||||
this.UnlockByLevel = UnlockByLevel;
|
||||
this.Region = Region;
|
||||
this.HeadIcon = HeadIcon;
|
||||
this.Model = Model;
|
||||
|
||||
}
|
||||
|
||||
public static DataNPCConfig DeserializeDataNPCConfig(JSONNode _buf)
|
||||
{
|
||||
return new CharacterCfg.DataNPCConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 角色ID
|
||||
/// </summary>
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string RoleName { get; private set; }
|
||||
/// <summary>
|
||||
/// 呼号
|
||||
/// </summary>
|
||||
public string RoleNickName { get; private set; }
|
||||
/// <summary>
|
||||
/// 解锁条件(关卡)
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<int> UnlockByLevel { get; private set; }
|
||||
/// <summary>
|
||||
/// 地区
|
||||
/// </summary>
|
||||
public CharacterCfg.ERegion Region { get; private set; }
|
||||
/// <summary>
|
||||
/// 头像图标
|
||||
/// </summary>
|
||||
public string HeadIcon { get; private set; }
|
||||
/// <summary>
|
||||
/// 立绘
|
||||
/// </summary>
|
||||
public string Model { get; private set; }
|
||||
|
||||
public const int __ID__ = 719977670;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "ID:" + ID + ","
|
||||
+ "RoleName:" + RoleName + ","
|
||||
+ "RoleNickName:" + RoleNickName + ","
|
||||
+ "UnlockByLevel:" + Luban.StringUtil.CollectionToString(UnlockByLevel) + ","
|
||||
+ "Region:" + Region + ","
|
||||
+ "HeadIcon:" + HeadIcon + ","
|
||||
+ "Model:" + Model + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: da6843cfcb8cb264595b06d8c78adc07
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
namespace cfg.CharacterCfg
|
||||
{
|
||||
public partial class NPCConfig
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, CharacterCfg.DataNPCConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.List<CharacterCfg.DataNPCConfig> _dataList;
|
||||
|
||||
public NPCConfig(JSONNode _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, CharacterCfg.DataNPCConfig>();
|
||||
_dataList = new System.Collections.Generic.List<CharacterCfg.DataNPCConfig>();
|
||||
|
||||
foreach(JSONNode _ele in _buf.Children)
|
||||
{
|
||||
CharacterCfg.DataNPCConfig _v;
|
||||
{ if(!_ele.IsObject) { throw new SerializationException(); } _v = global::cfg.CharacterCfg.DataNPCConfig.DeserializeDataNPCConfig(_ele); }
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.ID, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, CharacterCfg.DataNPCConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<CharacterCfg.DataNPCConfig> DataList => _dataList;
|
||||
|
||||
public CharacterCfg.DataNPCConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public CharacterCfg.DataNPCConfig Get(int key) {
|
||||
if (_dataMap.TryGetValue(key, out var v)) {
|
||||
return v;
|
||||
} else {
|
||||
UnityEngine.Debug.LogError($"table key not found: {key}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public CharacterCfg.DataNPCConfig this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e9a974eea149e2b4ba86fbb03509ece3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -163,6 +163,7 @@ public partial class Tables
|
|||
public FightCfg.FightTrainConfig FightTrainConfig {get; }
|
||||
public LevelCfg.FiringRangeConfig FiringRangeConfig {get; }
|
||||
public PremiumCfg.PremiumPerks PremiumPerks {get; }
|
||||
public CharacterCfg.NPCConfig NPCConfig {get; }
|
||||
|
||||
public Tables(System.Func<string, JSONNode> loader)
|
||||
{
|
||||
|
|
@ -314,6 +315,7 @@ public partial class Tables
|
|||
FightTrainConfig = new FightCfg.FightTrainConfig(loader("fightcfg_fighttrainconfig"));
|
||||
FiringRangeConfig = new LevelCfg.FiringRangeConfig(loader("levelcfg_firingrangeconfig"));
|
||||
PremiumPerks = new PremiumCfg.PremiumPerks(loader("premiumcfg_premiumperks"));
|
||||
NPCConfig = new CharacterCfg.NPCConfig(loader("charactercfg_npcconfig"));
|
||||
ResolveRef();
|
||||
}
|
||||
|
||||
|
|
@ -467,6 +469,7 @@ public partial class Tables
|
|||
FightTrainConfig.ResolveRef(this);
|
||||
FiringRangeConfig.ResolveRef(this);
|
||||
PremiumPerks.ResolveRef(this);
|
||||
NPCConfig.ResolveRef(this);
|
||||
}
|
||||
|
||||
public static void PostPreload(Action<string> loader)
|
||||
|
|
@ -619,6 +622,7 @@ public partial class Tables
|
|||
loader("fightcfg_fighttrainconfig");
|
||||
loader("levelcfg_firingrangeconfig");
|
||||
loader("premiumcfg_premiumperks");
|
||||
loader("charactercfg_npcconfig");
|
||||
}
|
||||
|
||||
public static void AfterLoaded(Action<string> loader)
|
||||
|
|
@ -771,6 +775,7 @@ public partial class Tables
|
|||
loader("fightcfg_fighttrainconfig");
|
||||
loader("levelcfg_firingrangeconfig");
|
||||
loader("premiumcfg_premiumperks");
|
||||
loader("charactercfg_npcconfig");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,13 @@
|
|||
[
|
||||
{
|
||||
"ID": 900001,
|
||||
"RoleName": "npc_name_1",
|
||||
"RoleNickName": "story_character_nick_name_1",
|
||||
"UnlockByLevel": [
|
||||
102005
|
||||
],
|
||||
"Region": 0,
|
||||
"HeadIcon": "",
|
||||
"Model": ""
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d496ccb725877241a40a2b6ef6bfb57
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -81,21 +81,7 @@
|
|||
"Category": 0,
|
||||
"CategoryName": "CharacterFileConfig_CategoryName_7",
|
||||
"content": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
1005,
|
||||
1006
|
||||
900001
|
||||
],
|
||||
"FlagPicPath": "",
|
||||
"RegionPicPath": "Assets/Art/UI/Texture/Camp_Pictoria/NPC/UI_Codex_di_03.png"
|
||||
|
|
|
|||
Loading…
Reference in New Issue