2024-01-15 12:12:47 +08:00
|
|
|
|
using Framework;
|
2024-06-19 15:44:06 +08:00
|
|
|
|
|
2024-01-15 12:12:47 +08:00
|
|
|
|
namespace Gameplay.Utils
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class PathEx
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 用于获取载具的原始模型路径,用于导出,该路径并不会被addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="prefabName"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetVehicleSrcModelPath(string prefabName)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/Character/Prefabs/Vehicle/{prefabName}.prefab";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取载具游戏中使用的模型路径,用于addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="configId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetVehicleGameModelPath(int configId)
|
|
|
|
|
|
{
|
|
|
|
|
|
var savePath = string.Format(Constants.VEHICLE_OUTPUT_PATH, configId);
|
|
|
|
|
|
var prefabPath = $"{savePath}/vehicle_{configId}.prefab";
|
|
|
|
|
|
return prefabPath;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-15 12:39:20 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取角色构建使用的原始路径,用于导出,该路径并不会被addressable打包
|
|
|
|
|
|
/// </summary>
|
2024-01-15 12:47:59 +08:00
|
|
|
|
/// <param name="nameId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetCharacterSrcModelPath(string nameId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/Character/Prefabs/Players/P_{nameId}.prefab";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取敌人构建使用的原始路径,用于导出,该路径并不会被addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="nameId"></param>
|
2024-01-15 12:39:20 +08:00
|
|
|
|
/// <returns></returns>
|
2024-01-15 12:47:59 +08:00
|
|
|
|
public static string GetEnemySrcModelPath(string nameId)
|
2024-01-15 12:39:20 +08:00
|
|
|
|
{
|
2024-01-15 12:47:59 +08:00
|
|
|
|
return $"Assets/Art/Character/Prefabs/Enemy/P_{nameId}.prefab";
|
2024-01-15 12:39:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取角色游戏中用于展示及剧情的模型路径,用于addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="nameId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetCharacterDisplayModelPath(string nameId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/Character/Prefabs/Players_S/P_S_{nameId}.prefab";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取角色游戏中用于战斗的模型路径,用于addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="nameId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetCharacterFightModelPath(string nameId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/AutoGen/Characters/character_{nameId}/character_{nameId}.prefab";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-15 13:08:39 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取召唤物游戏中用于战斗的模型路径,用于addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="prefabName"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetSummonGameModelPath(string prefabName)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/Character/Prefabs/Summon/{prefabName}.prefab";
|
|
|
|
|
|
}
|
2024-06-19 15:44:06 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取NPC游戏中用于展示及剧情的模型路径,用于addressable打包
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="prefabName"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetNpcDisplayModelPath(string prefabName)
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"Assets/Art/Character/Prefabs/Npc_S/P_S_{prefabName}.prefab";
|
|
|
|
|
|
}
|
2024-09-23 15:53:38 +08:00
|
|
|
|
|
|
|
|
|
|
public static string GetFightBuildingModelPath(uint uid)
|
|
|
|
|
|
{
|
|
|
|
|
|
var cfg = TableManager.Instance.Tables.BuildConfig.Get((int)uid);
|
|
|
|
|
|
if (cfg == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return cfg.ModelPath;
|
|
|
|
|
|
}
|
2024-01-15 12:12:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|