You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

259 lines
9.8 KiB

using UnityEngine;
using System.Numerics;
using Vector3 = UnityEngine.Vector3;
public static class Global
{
#region Version
// MajorVer.MinorVer.DetailVerSubVer.
public const int MajorVer = 0;
public const int MinorVer = 1;
public const int DetailVer = 0;
public const int SubVer = 0;
public const int CVer = 0;
//public const int CCheck = 1;
#if VER_DEV
public const string ServerType = "D";
#elif VER_TEST
public const string ServerType = "T";
#elif VER_ZOMBIE
public const string ServerType = "Z";
#else
public const string ServerType = "";
#endif
#if UNITY_EDITOR
public const char Platform = 'E';
public const string Store = "editor";
#elif UNITY_IOS
public const char Platform = 'A';
public const string Store = "apple";
#elif VER_ONESTORE
public const char Platform = 'O';
public const string Store = "onestore";
#else
public const char Platform = 'G';
public const string Store = "google";
#endif
public static string AppVersionBuild()
{
return string.Format("{0}.{1}.{2}", MajorVer, MinorVer, DetailVer);
}
// Majorver * 100 + MinorVer.
public const int GameVer = (MajorVer * 100) + MinorVer;
#endregion Version
#region External URL
/*** 외부 URL START ***/
#if VER_ONESTORE
public const string MURL_Review = "url_review_pc_o";
//public const string MURL_Review = "url_review_o";
#elif UNITY_ANDROID
//public const string MURL_Review = "url_review_pc_g";
public const string MURL_Review = "url_review_g";
#else
//public const string MURL_Review = "url_review_pc_a";
public const string MURL_Review = "url_review_a";
#endif
public const string MURL_EEA = "http://adservice.google.com/getconfig/pubvendors";
public const string MURL_Community = "url_community";
public const string MURL_Terms = "url_terms";
public const string MURL_ShopTerms = "url_shopterms";
public const string MURL_Privacy = "url_privacy";
//https://itunes.apple.com/app/apple-store/id{0}
//itms-apps://itunes.apple.com/app/id{0}
/*** 외부 URL END ***/
#endregion External URL
#region Localization
// 일반적으로 자주 사용되는 번역 키.
public const string STR_OK = "all_ok";
public const string STR_YES = "all_yes";
public const string STR_NO = "all_no";
public const string STR_CANCEL = "all_cancel";
public const string STR_MIN = "all_min";
public const string STR_MAX = "all_max";
// 등록하기.
public const string STR_SET = "all_set";
public const string STR_CONFIRM = "all_confirm";
public const string STR_REWARD = "all_reward";
public const string STR_REWARDGET = "all_rewardget";
// 사용.
public const string STR_USE = "all_use";
public const string STR_Saved = "msg_saved";
public const string STR_Applied = "msg_applied";
public const string STR_NoGoods = "msg_nogood";
public const string STR_NoMaterials = "msg_nomaterial";
public const string STR_NoItems = "msg_noitem";
public const string STR_Included = "msg_included";
public const string STR_CheckNetwork = "msg_checknetwork";
public const string STR_Prepare = "msg_prepare";
#endregion Localization
#region Prefs Master
// 모든 서버 공통 정보.
// 로컬 데이터 저장 파일/키.
public const string ES3_StartMain = "sm.es3";
public const string ES3_PlayGoods = "pg.es3";
public const string ES3_PlayBox = "pb.es3";
public const string ES3_PlayDatas = "pd.es3";
public const string ES3_PlayRecord = "pr.es3";
public const string ES3_CharAwaken = "cawa.es3";
public const string ES3_PlayIcon = "pi.es3";
public const string ES3_PlayTitle = "pt.es3";
public const string ES3_Pass = "cps.es3";
public const string ES3_Notice = "nc.es3";
public const string ES3_AdBuff = "ab.es3";
public const string ES3_DgPreset = "dps.es3";
//public const string ES3_Notice = "noticedaily";
public const string ES3_Login = "login";
public const string ES3_Language = "language";
public const string ES3_Bgm = "bgm";
public const string ES3_BgmVol = "bgmvol";
public const string ES3_EfcVol = "efcvol";
public const string ES3_VoiceVol = "voicevol";
public const string ES3_Zoom = "zoom";
public const string ES3_Shake = "shake";
public const string ES3_DamageText = "dmgtxt";
public const string ES3_SkillEffect = "skilleffect";
public const string ES3_LowOption = "lowoption";
public const string ES3_AutoSleep = "autosleep";
public const string ES3_Notify = "notify";
public const string ES3_NightNotify = "nightNotify";
public const string ES3_TestMod = "testmod";
public const string ES3_EventTrade = "tradeevent";
public const string ES3_EventRaise = "raiseevent";
public const string ES3_EventRoulette = "rouletteevent";
//public const string ES3_Preorder = "preorder";
//public const string ES3_LocalPA = "localpa";
#endregion Prefs Master
#region Prefs Server
// 서버별 정보.
public const string ES3_Server = "sv{0}.es3";
public const string ES3_PetSpiritRarity = "psrarities";
public const string ES3_ChatBlock = "chatblock";
//public const string ES3_AutoSkill = "autoskill";
//public const string ES3_AutoRestage = "autorestage";
//public const string ES3_BuffAtk = "buffatk";
//public const string ES3_BuffGold = "buffgold";
//public const string ES3_BuffCrtPow = "buffcrtpow";
#endregion Prefs Server
#region Const
public static readonly BigInteger Bi10_6 = new BigInteger(1000000L);
public static readonly BigInteger Bi10_12 = new BigInteger(1000000000000L);
public static readonly BigInteger Bi10_18 = new BigInteger(1000000000000000000L);
public static readonly BigInteger Bi10_24 = Bi10_12 * Bi10_12;
public static readonly BigInteger Bi10_30 = Bi10_12 * Bi10_18;
public static readonly float MultiSize = 0.75f;
public static readonly float DispSize = 0f;
public static readonly Vector3 V3_1 = new Vector3(MultiSize, MultiSize, MultiSize);
public static readonly Vector3 V3_1XRev = new Vector3(-MultiSize, MultiSize, MultiSize);
public static readonly Vector3 V3_1G = new Vector3(DispSize, DispSize, DispSize);
public static readonly Vector3 oneRev = new Vector3(-1, 1, 1);
public static readonly Vector3 V3_001 = new Vector3(0.01f, 0.01f, 0.01f);
public static readonly Vector3 V3_001XRev = new Vector3(-0.01f, 0.01f, 0.01f);
public static readonly Vector3 V3_Camera = new Vector3(0, 1.5f, -2f);
public static readonly Vector3 V3_RotRev = new Vector3(0, 180, 0);
#endregion Const
#region Color
public static readonly Color CLR_Trans = new Color(1f, 1f, 1f, 0f);
public static readonly Color CLR_White = new Color(1f, 1f, 1f, 1f);
public static readonly Color CLR_TextYellow = new Color(255f / 255f, 233f / 255f, 109f / 255f, 1f);
public static readonly Color CLR_TextRed = new Color(255f / 255f, 114f / 255f, 114f / 255f, 1f);
public static readonly Color CLR_BtnBlue = new Color(63f / 255f, 161f / 255f, 252f / 255f, 1f);
public static readonly Color CLR_BtnDia = new Color(114f / 255f, 126f / 255f, 255f / 255f, 1f);
public static readonly Color CLR_BtnMileage = new Color(255f / 255f, 193f / 255f, 0f / 255f, 1f);
public static readonly Color CLR_PresetEmpty = new Color(179f / 255f, 179f / 255f, 179f / 255f, 1f);
public static readonly Color CLR_FrontNotHave = new Color(1f, 1f, 1f, 0.5f);
public static readonly Color CLR_BackPetSpirit = new Color(172f / 255f, 56f / 255f, 217f / 255f, 1f);
public static readonly Color CLR_BackCos = new Color(156f / 255f, 200f / 255f, 255f / 255f, 1f);
public static readonly Color CLR_Empty = new Color(0f, 0f, 0f, 0f);
public static readonly Color CLR_Mint = new Color(56f / 255f, 240f / 255f, 216f / 255f);
public static readonly Color[] CLR_RarityBack = new Color[8]
{
new Color(255f / 255f, 206f / 255f, 65f / 255f, 1f),
new Color(232f / 255f, 232f / 255f, 232f / 255f, 1f),
new Color(255f / 255f, 245f / 255f, 150f / 255f, 1f),
new Color(203f / 255f, 255f / 255f, 150f / 255f, 1f),
new Color(133f / 255f, 212f / 255f, 250f / 255f, 1f),
new Color(219f / 255f, 123f / 255f, 253f / 255f, 1f),
new Color(255f / 255f, 181f / 255f, 93f / 255f, 1f),
new Color(255f / 255f, 117f / 255f, 109f / 255f, 1f)
};
public static readonly Color[] CLR_RarityFront = new Color[8]
{
new Color(255f / 255f, 205f / 255f, 243f / 255f, 1f),
new Color(123f / 255f, 123f / 255f, 123f / 255f, 1f),
new Color(215f / 255f, 150f / 255f, 18f / 255f, 1f),
new Color(116f / 255f, 170f / 255f, 14f / 255f, 1f),
new Color(49f / 255f, 110f / 255f, 199f / 255f, 1f),
new Color(124f / 255f, 30f / 255f, 146f / 255f, 1f),
new Color(203f / 255f, 75f / 255f, 9f / 255f, 1f),
new Color(157f / 255f, 29f / 255f, 32f / 255f, 1f)
};
public static readonly string[] STR_Rarity = new string[8] { null, "D", "C", "B", "A", "S", "SS", "SR" };
public static readonly Color CLR_WaveProgress= new Color(255f / 255f, 255f / 255f, 255f / 255f, 1f);
#endregion Color
#region Calc.
public static float GetWaitSecond(int num)
{
float second = 1;
if (num <= 1)
{
second = 0.2f;
}
else if (num > 1 && num <= 3)
{
second = 0.15f;
}
else if (num > 3 && num <= 5)
{
second = 0.1f;
}
else
{
second = 0.06f;
}
return second;
}
public static int IntPow(int value, uint pow)
{
int ret = 1;
while (pow != 0)
{
if ((pow & 1) == 1)
ret *= value;
value *= value;
pow >>= 1;
}
return ret;
}
#endregion Calc.
}