mergemilitary/Assets/Scripts/Const/Const.Path.cs

107 lines
3.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public partial class Const
{
public static class Path
{
public static string GetBlockMat(BlockState pState)
{
return "Material/Block_" + pState.ToString();
}
public static string GetSoldierIcon(string pIconName)
{
return "UI/Icon/Soldier/" + pIconName.ToString();
}
public static string GetDiamondIcon(string pIconName)
{
return "UI/Icon/Diamond/" + pIconName.ToString();
}
public static string GetPetIcon(string pIconName)
{
return "UI/Icon/Pet/" + pIconName.ToString();
}
public static string GetFloorIcon(string pIconName)
{
return "UI/Icon/Floor/" + pIconName.ToString();
}
public static string GetStage(int pStageID)
{
return string.Format("Prefab/Stage/Stage{0:D2}", pStageID);
}
public static string GetPet(int pPetID)
{
return string.Format("Prefab/Pet/Pet_{0:D2}", pPetID);
}
public static string GetMergeFxByPet(int pPetID)
{
if (pPetID < 0)
{
return "Prefab/Fx/Merge/MergeFx_00";
}
return string.Format("Prefab/Fx/Merge/MergeFx_{0:D2}", pPetID);
}
public static string GetDropFxByLevel(int pLevel)
{
if (pLevel < 0)
{
return "Prefab/Fx/Drop/DropFx_00";
}
return string.Format("Prefab/Fx/Drop/DropFx_{0:D2}", pLevel);
}
public static string GetMergeFxByLevel(int pLevel)
{
if (pLevel < 0)
{
return "Prefab/Fx/Merge/MergeFx_00";
}
return string.Format("Prefab/Fx/Merge/MergeFx_{0:D2}", pLevel);
}
public static string GetBlockUnit(BlockType pBType, int pLevel, bool pIsPlayer)
{
string tFakePostfix = GameConfig.Instance.IsFakeMode ? "_Fake" : "";
return string.Format("Prefab/BlockUnit{0}/{1}/Block{2}_{3:D2}", tFakePostfix, Utils.GetUnitIDPrefix(pBType, pIsPlayer), pBType.ToString(), pLevel);
}
public static string GetBullet(BlockType pBType, int pLevel, bool pIsPlayer)
{
string tFakePostfix = GameConfig.Instance.IsFakeMode ? "_Fake" : "";
return string.Format("Prefab/Bullet{0}/{1}/Bullet{2}_{3:D2}", tFakePostfix, Utils.GetUnitIDPrefix(pBType, pIsPlayer), pBType.ToString(), pLevel);
}
public static string GetAtkFx(BlockType pBType, int pLevel, bool pIsPlayer)
{
return string.Format("Prefab/AtkFx/{0}/AtkFx{1}_{2:D2}", Utils.GetUnitIDPrefix(pBType, pIsPlayer), pBType.ToString(), pLevel);
}
public static string GetAtkSound(BlockType pBType, int pLevel, bool pIsPlayer)
{
string tUnitIDPrefix = Utils.GetUnitIDPrefix(pBType, pIsPlayer);
DataUnit tData = TableUnit.Instance.GetData(Utils.GetUnitID(tUnitIDPrefix, pLevel));
return string.Format("Audio/{0}/{0}_{1:D2}_Attack", tUnitIDPrefix, tData.AtkSoundID);
}
public static string GetHitSound(BlockType pBType, int pLevel, bool pIsPlayer)
{
string tUnitIDPrefix = Utils.GetUnitIDPrefix(pBType, pIsPlayer);
DataUnit tData = TableUnit.Instance.GetData(Utils.GetUnitID(tUnitIDPrefix, pLevel));
return string.Format("Audio/{0}/{0}_{1:D2}_Hit", tUnitIDPrefix, tData.HitSoundID);
}
}
}