120 lines
3.9 KiB
C#
120 lines
3.9 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 GetMergeFx(int pPetID)
|
|
{
|
|
if (pPetID < 0)
|
|
{
|
|
return "Prefab/Fx/Merge/MergeFx_00";
|
|
}
|
|
|
|
return string.Format("Prefab/Fx/Merge/MergeFx_{0:D2}", pPetID);
|
|
}
|
|
|
|
public static string GetBlockUnit(BlockType pBType, int pLevel, bool pIsPlayer)
|
|
{
|
|
string tDifferPath = "";
|
|
|
|
if ((pBType == BlockType.Monster && GameConfig.Instance.DifferNear) || (pBType == BlockType.Human && GameConfig.Instance.DifferFar))
|
|
{
|
|
tDifferPath = pIsPlayer ? "_Player" : "_Enemy";
|
|
}
|
|
|
|
return string.Format("Prefab/BlockUnit/{0}/Block{1}_{2:D2}", pBType + tDifferPath, pBType.ToString(), pLevel);
|
|
}
|
|
|
|
public static string GetBullet(BlockType pBType, int pLevel, bool pIsPlayer)
|
|
{
|
|
string tDifferPath = "";
|
|
|
|
if ((pBType == BlockType.Monster && GameConfig.Instance.DifferNear) || (pBType == BlockType.Human && GameConfig.Instance.DifferFar))
|
|
{
|
|
tDifferPath = pIsPlayer ? "_Player" : "_Enemy";
|
|
}
|
|
|
|
return string.Format("Prefab/Bullet/{0}/Bullet{1}_{2:D2}", pBType + tDifferPath, pBType.ToString(), pLevel);
|
|
}
|
|
|
|
public static string GetAtkFx(BlockType pBType, int pLevel, bool pIsPlayer)
|
|
{
|
|
string tDifferPath = "";
|
|
|
|
if ((pBType == BlockType.Monster && GameConfig.Instance.DifferNear) || (pBType == BlockType.Human && GameConfig.Instance.DifferFar))
|
|
{
|
|
tDifferPath = pIsPlayer ? "_Player" : "_Enemy";
|
|
}
|
|
|
|
return string.Format("Prefab/AtkFx/{0}/AtkFx{0}_{1:D2}", pBType + tDifferPath, pLevel);
|
|
}
|
|
|
|
public static string GetAtkSound(BlockType pBType, int pLevel)
|
|
{
|
|
if (pBType == BlockType.Human)
|
|
{
|
|
switch (pLevel)
|
|
{
|
|
case 1: case 2: case 3: pLevel = 1; break;
|
|
case 4: case 5: pLevel = 4; break;
|
|
case 6: case 7: pLevel = 6; break;
|
|
case 8: case 9: case 10: pLevel = 8; break;
|
|
}
|
|
}
|
|
return string.Format("Audio/{0}/{0}_{1:D2}_Attack", pBType.ToString(), pLevel);
|
|
}
|
|
|
|
public static string GetHitSound(BlockType pBType, int pLevel)
|
|
{
|
|
if (pBType == BlockType.Human)
|
|
{
|
|
switch (pLevel)
|
|
{
|
|
case 1: case 2: case 3: pLevel = 1; break;
|
|
case 4: case 5: pLevel = 4; break;
|
|
case 6: case 7: pLevel = 6; break;
|
|
case 8: case 9: case 10: pLevel = 8; break;
|
|
}
|
|
}
|
|
return string.Format("Audio/{0}/{0}_{1:D2}_Hit", pBType.ToString(), pLevel);
|
|
}
|
|
}
|
|
} |