mergemilitary/Assets/MMOModule/Scripts/MMOUtils/MMOUtils.cs

26 lines
810 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MMO
{
public static class MMOUtils
{
public static Sprite LoadTaskIcon(MMOTaskType pType)
{
string tPath = "";
switch (pType)
{
case MMOTaskType.GetDiamond: tPath = "MMOImage/TaskIcon/Diamond"; break;
case MMOTaskType.PassLevel:
case MMOTaskType.DailyLevel: tPath = "MMOImage/TaskIcon/Level"; break;
case MMOTaskType.WatchAds:
case MMOTaskType.DailyAds: tPath = "MMOImage/TaskIcon/WatchAd"; break;
case MMOTaskType.RiseRank: tPath = "MMOImage/TaskIcon/Rank"; break;
}
return Resources.Load<Sprite>(tPath);
}
}
}