Commit 8c6b0dfc authored by Unicorn's avatar Unicorn

YGOMobile Paths

parent 98996656
...@@ -50,6 +50,7 @@ picture/ ...@@ -50,6 +50,7 @@ picture/
replay/ replay/
sound/ sound/
textures/ textures/
updates/
cards.cdb cards.cdb
lflist.conf lflist.conf
strings.conf strings.conf
......
...@@ -20,7 +20,7 @@ public class barPngLoader : MonoBehaviour { ...@@ -20,7 +20,7 @@ public class barPngLoader : MonoBehaviour {
api_timeBar.mainTexture = GameTextureManager.time; api_timeBar.mainTexture = GameTextureManager.time;
try try
{ {
string[] allLines = (File.ReadAllText("textures/duel/healthBar/config.txt").Replace("\r", "").Replace(" ", "").Split("\n")); string[] allLines = (File.ReadAllText("textures/duel/healthBar/config.txt").Replace("\r", "").Replace(" ", "").Split("\n"));//YGOMobile Paths
foreach (var item in allLines) foreach (var item in allLines)
{ {
string[] mats = item.Split("="); string[] mats = item.Split("=");
......
...@@ -33,7 +33,7 @@ public class UITextureInspector : UIBasicSpriteEditor ...@@ -33,7 +33,7 @@ public class UITextureInspector : UIBasicSpriteEditor
startPath = sp2.stringValue; startPath = sp2.stringValue;
if (startPath != "") if (startPath != "")
{ {
mTex.mainTexture = UIHelper.getTexture2D("textures/ui/" + startPath + ".png"); mTex.mainTexture = UIHelper.getTexture2D("textures/ui/" + startPath + ".png");//YGOMobile Paths
} }
Debug.Log("force delay read"); Debug.Log("force delay read");
} }
......
...@@ -7,7 +7,7 @@ public class BackGroundPic : Servant ...@@ -7,7 +7,7 @@ public class BackGroundPic : Servant
public override void initialize() public override void initialize()
{ {
backGround = create(Program.I().mod_simple_ngui_background_texture, Vector3.zero, Vector3.zero, false, Program.ui_back_ground_2d); backGround = create(Program.I().mod_simple_ngui_background_texture, Vector3.zero, Vector3.zero, false, Program.ui_back_ground_2d);
FileStream file = new FileStream("textures/bg.jpg", FileMode.Open, FileAccess.Read); FileStream file = new FileStream("textures/bg.jpg", FileMode.Open, FileAccess.Read);//YGOMobile Paths
file.Seek(0, SeekOrigin.Begin); file.Seek(0, SeekOrigin.Begin);
byte[] data = new byte[file.Length]; byte[] data = new byte[file.Length];
file.Read(data, 0, (int)file.Length); file.Read(data, 0, (int)file.Length);
......
...@@ -51,7 +51,7 @@ public static class Config ...@@ -51,7 +51,7 @@ public static class Config
if (loaded == false) if (loaded == false)
{ {
loaded = true; loaded = true;
string[] lines = File.ReadAllText("textures/ui/config.txt").Replace("\r", "").Replace(" ", "").Split("\n"); string[] lines = File.ReadAllText("textures/ui/config.txt").Replace("\r", "").Replace(" ", "").Split("\n");//YGOMobile Paths
for (int i = 0; i < lines.Length; i++) for (int i = 0; i < lines.Length; i++)
{ {
string[] mats = lines[i].Split("="); string[] mats = lines[i].Split("=");
......
...@@ -736,7 +736,7 @@ public static class UIHelper ...@@ -736,7 +736,7 @@ public static class UIHelper
{ {
try try
{ {
FileInfo[] fileInfos = (new DirectoryInfo("textures/face")).GetFiles(); FileInfo[] fileInfos = (new DirectoryInfo("textures/face")).GetFiles();//YGOMobile Paths
for (int i = 0; i < fileInfos.Length; i++) for (int i = 0; i < fileInfos.Length; i++)
{ {
if (fileInfos[i].Name.Length > 4) if (fileInfos[i].Name.Length > 4)
...@@ -748,7 +748,7 @@ public static class UIHelper ...@@ -748,7 +748,7 @@ public static class UIHelper
{ {
try try
{ {
faces.Add(name, UIHelper.getTexture2D("textures/face/" + fileInfos[i].Name)); faces.Add(name, UIHelper.getTexture2D("textures/face/" + fileInfos[i].Name));//YGOMobile Paths
} }
catch (Exception e) catch (Exception e)
{ {
......
...@@ -130,9 +130,9 @@ public class GameField : OCGobject ...@@ -130,9 +130,9 @@ public class GameField : OCGobject
public void loadOldField() public void loadOldField()
{ {
if (File.Exists("textures/field2.png")) if (File.Exists("textures/field2.png"))//YGOMobile Paths
{ {
Texture2D textureField = UIHelper.getTexture2D("textures/field2.png"); Texture2D textureField = UIHelper.getTexture2D("textures/field2.png");//YGOMobile Paths
Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField); Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField);
leftT.mainTexture = textureFieldSliced[0]; leftT.mainTexture = textureFieldSliced[0];
midT.mainTexture = textureFieldSliced[1]; midT.mainTexture = textureFieldSliced[1];
...@@ -150,9 +150,9 @@ public class GameField : OCGobject ...@@ -150,9 +150,9 @@ public class GameField : OCGobject
public void loadNewField() public void loadNewField()
{ {
if (File.Exists("textures/field3.png")) if (File.Exists("textures/field3.png"))//YGOMobile Paths
{ {
Texture2D textureField = UIHelper.getTexture2D("textures/field3.png"); Texture2D textureField = UIHelper.getTexture2D("textures/field3.png");//YGOMobile Paths
Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField); Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField);
leftT.mainTexture = textureFieldSliced[0]; leftT.mainTexture = textureFieldSliced[0];
midT.mainTexture = textureFieldSliced[1]; midT.mainTexture = textureFieldSliced[1];
......
...@@ -280,32 +280,36 @@ public class Program : MonoBehaviour ...@@ -280,32 +280,36 @@ public class Program : MonoBehaviour
//System.IO.Directory.SetCurrentDirectory(System.Windows.Forms.Application.StartupPath); //System.IO.Directory.SetCurrentDirectory(System.Windows.Forms.Application.StartupPath);
#elif UNITY_ANDROID //Android #elif UNITY_ANDROID //Android
//保持唤醒
Screen.sleepTimeout = SleepTimeout.NeverSleep; Screen.sleepTimeout = SleepTimeout.NeverSleep;
//创建资源目录 //YGOMobile Paths (https://github.com/Unicorn369/YGOPro2_Droid)
if (!Directory.Exists("/storage/emulated/0/ygocore/updates/version1.0.txt")) string GamePaths = "/storage/emulated/0/ygocore";
{
string filePath = Application.streamingAssetsPath + "/ygocore.zip"; //YGOPro2 Paths (https://github.com/Unicorn369/YGOPro2_Droid/tree/Test)
var www = new WWW(filePath); //string GamePaths = "/storage/emulated/0/ygopro2/";
while (!www.isDone) { }
byte[] bytes = www.bytes;
ExtractZipFile(bytes, "/storage/emulated/0/");
File.Create("/storage/emulated/0/ygocore/.nomedia");
}
Environment.CurrentDirectory = "/storage/emulated/0/ygocore"; if(!File.Exists(GamePaths + "updates/version1.0.txt"))
System.IO.Directory.SetCurrentDirectory("/storage/emulated/0/ygocore"); {
string filePath = Application.streamingAssetsPath + "ygocore.zip";
var www = new WWW(filePath);
while (!www.isDone) { }
byte[] bytes = www.bytes;
ExtractZipFile(bytes, GamePaths);
//File.Create(GamePaths + ".nomedia");
}
Environment.CurrentDirectory = GamePaths;
System.IO.Directory.SetCurrentDirectory(GamePaths);
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //iPhone
if (!Directory.Exists(Application.persistentDataPath +"/ygocore/updates/version1.0.txt")) string GamePaths = Application.persistentDataPath + "/ygopro2/";
{ if(!File.Exists(GamePaths + "updates/version1.0.txt"))
string filePath = Application.streamingAssetsPath + "/ygocore.zip"; {
var www = new WWW(filePath); string filePath = Application.streamingAssetsPath + "/ygocore.zip";
while (!www.isDone) { } var www = new WWW(filePath);
byte[] bytes = www.bytes; while (!www.isDone) { }
ExtractZipFile(System.IO.File.ReadAllBytes (bytes), Application.persistentDataPath + "/"); byte[] bytes = www.bytes;
} ExtractZipFile(System.IO.File.ReadAllBytes(bytes), GamePaths);
Environment.CurrentDirectory = Application.persistentDataPath+"/ygocore"; }
System.IO.Directory.SetCurrentDirectory(Application.persistentDataPath+"/ygocore"); Environment.CurrentDirectory = GamePaths;
System.IO.Directory.SetCurrentDirectory(GamePaths);
#endif #endif
go(1, () => go(1, () =>
{ {
...@@ -323,20 +327,19 @@ public class Program : MonoBehaviour ...@@ -323,20 +327,19 @@ public class Program : MonoBehaviour
//InterString.initialize("config" + AppLanguage.LanguageDir() + "/translation.conf"); //System Language //InterString.initialize("config" + AppLanguage.LanguageDir() + "/translation.conf"); //System Language
GameTextureManager.initialize(); GameTextureManager.initialize();
Config.initialize("config/config.conf"); Config.initialize("config/config.conf");
//GameStringManager.initialize("config/strings.conf"); GameStringManager.initialize("strings.conf");//YGOMobile Paths
GameStringManager.initialize("strings.conf"); if (File.Exists("cdb/strings.conf"))
if (File.Exists("config/strings.conf"))
{ {
GameStringManager.initialize("config/strings.conf"); GameStringManager.initialize("cdb/strings.conf");
} }
if (File.Exists("expansions/strings.conf")) if (File.Exists("expansions/strings.conf"))
{ {
GameStringManager.initialize("expansions/strings.conf"); GameStringManager.initialize("expansions/strings.conf");
} }
//YGOSharp.BanlistManager.initialize("config/lflist.conf"); YGOSharp.BanlistManager.initialize("lflist.conf");//YGOMobile Paths
YGOSharp.BanlistManager.initialize("lflist.conf");
FileInfo[] fileInfos = (new DirectoryInfo("cdb")).GetFiles().OrderByDescending(x => x.Name).ToArray(); FileInfo[] fileInfos = (new DirectoryInfo("cdb")).GetFiles().OrderByDescending(x => x.Name).ToArray();
//FileInfo[] fileInfos = (new DirectoryInfo("cdb" + AppLanguage.LanguageDir())).GetFiles().OrderByDescending(x => x.Name).ToArray();//System Language
for (int i = 0; i < fileInfos.Length; i++) for (int i = 0; i < fileInfos.Length; i++)
{ {
if (fileInfos[i].Name.Length > 4) if (fileInfos[i].Name.Length > 4)
...@@ -350,10 +353,10 @@ public class Program : MonoBehaviour ...@@ -350,10 +353,10 @@ public class Program : MonoBehaviour
} }
if (Directory.Exists("expansions")) if (Directory.Exists("expansions"))
//if (Directory.Exists("expansions" + AppLanguage.LanguageDir())) //if (Directory.Exists("expansions" + AppLanguage.LanguageDir()))//System Language
{ {
fileInfos = (new DirectoryInfo("expansions")).GetFiles().OrderByDescending(x => x.Name).ToArray(); ; fileInfos = (new DirectoryInfo("expansions")).GetFiles().OrderByDescending(x => x.Name).ToArray();
//fileInfos = (new DirectoryInfo("expansions" + AppLanguage.LanguageDir())).GetFiles(); //fileInfos = (new DirectoryInfo("expansions" + AppLanguage.LanguageDir())).GetFiles().OrderByDescending(x => x.Name).ToArray();//System Language
for (int i = 0; i < fileInfos.Length; i++) for (int i = 0; i < fileInfos.Length; i++)
{ {
if (fileInfos[i].Name.Length > 4) if (fileInfos[i].Name.Length > 4)
...@@ -451,6 +454,7 @@ public class Program : MonoBehaviour ...@@ -451,6 +454,7 @@ public class Program : MonoBehaviour
List<ApiFile> apiFromGit = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<List<ApiFile>>(w.text); List<ApiFile> apiFromGit = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<List<ApiFile>>(w.text);
if (!File.Exists("updates/SHAs.txt")) if (!File.Exists("updates/SHAs.txt"))
{ {
Directory.CreateDirectory("updates");
toDownload.AddRange(apiFromGit); toDownload.AddRange(apiFromGit);
} }
...@@ -485,11 +489,11 @@ public class Program : MonoBehaviour ...@@ -485,11 +489,11 @@ public class Program : MonoBehaviour
{ {
if (Path.GetExtension(dl.name)== ".cdb" && !(Application.internetReachability == NetworkReachability.NotReachable)) if (Path.GetExtension(dl.name)== ".cdb" && !(Application.internetReachability == NetworkReachability.NotReachable))
{ {
httpDldFile.Download(dl.download_url, Path.Combine("cdb", dl.name)); httpDldFile.Download(dl.download_url, Path.Combine("cdb/", dl.name));
} }
if (Path.GetExtension(dl.name) == ".conf" && !(Application.internetReachability == NetworkReachability.NotReachable)) if (Path.GetExtension(dl.name) == ".conf" && !(Application.internetReachability == NetworkReachability.NotReachable))
{ {
httpDldFile.Download(dl.download_url, Path.Combine("config", dl.name)); httpDldFile.Download(dl.download_url, Path.Combine("config/", dl.name));
} }
} }
File.WriteAllText("updates/SHAs.txt", w.text); File.WriteAllText("updates/SHAs.txt", w.text);
......
...@@ -332,10 +332,14 @@ public class GameTextureManager ...@@ -332,10 +332,14 @@ public class GameTextureManager
path = "picture/card/" + pic.code.ToString() + ".jpg"; path = "picture/card/" + pic.code.ToString() + ".jpg";
} }
bool Iam8 = false; bool Iam8 = false;
//if (!File.Exists(path))
//{
// Iam8 = true;
// path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
//}
if (!File.Exists(path)) if (!File.Exists(path))
{ {
Iam8 = true; path = "expansions/pics/" + pic.code.ToString() + ".png";
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{ {
...@@ -343,6 +347,10 @@ public class GameTextureManager ...@@ -343,6 +347,10 @@ public class GameTextureManager
path = "expansions/pics/" + pic.code.ToString() + ".jpg"; path = "expansions/pics/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{
path = "pics/" + pic.code.ToString() + ".png";
}
if (!File.Exists(path))
{ {
Iam8 = true; Iam8 = true;
path = "pics/" + pic.code.ToString() + ".jpg"; path = "pics/" + pic.code.ToString() + ".jpg";
...@@ -604,10 +612,14 @@ public class GameTextureManager ...@@ -604,10 +612,14 @@ public class GameTextureManager
path = "picture/card/" + pic.code.ToString() + ".jpg"; path = "picture/card/" + pic.code.ToString() + ".jpg";
} }
bool Iam8 = false; bool Iam8 = false;
//if (!File.Exists(path))
//{
// Iam8 = true;
// path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
//}
if (!File.Exists(path)) if (!File.Exists(path))
{ {
Iam8 = true; path = "expansions/pics/" + pic.code.ToString() + ".png";
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{ {
...@@ -615,13 +627,17 @@ public class GameTextureManager ...@@ -615,13 +627,17 @@ public class GameTextureManager
path = "expansions/pics/" + pic.code.ToString() + ".jpg"; path = "expansions/pics/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{
path = "pics/" + pic.code.ToString() + ".png";
}
if (!File.Exists(path))
{ {
Iam8 = true; Iam8 = true;
path = "pics/" + pic.code.ToString() + ".jpg"; path = "pics/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{ {
path = "textures/unknown.jpg"; path = "textures/unknown.jpg";//YGOMobile Paths
} }
if (!File.Exists(path)) if (!File.Exists(path))
{ {
...@@ -787,10 +803,10 @@ public class GameTextureManager ...@@ -787,10 +803,10 @@ public class GameTextureManager
{ {
path = "picture/card/" + pic.code.ToString() + ".jpg"; path = "picture/card/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) //if (!File.Exists(path))
{ //{
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"; // path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
} //}
if (!File.Exists(path)) if (!File.Exists(path))
{ {
path = "expansions/pics/" + pic.code.ToString() + ".png"; path = "expansions/pics/" + pic.code.ToString() + ".png";
...@@ -807,23 +823,25 @@ public class GameTextureManager ...@@ -807,23 +823,25 @@ public class GameTextureManager
{ {
path = "pics/" + pic.code.ToString() + ".jpg"; path = "pics/" + pic.code.ToString() + ".jpg";
} }
#if UNITY_ANDROID || UNITY_IPHONE //Android、iPhone
if (!File.Exists(path) && pic.code != 0) if (!File.Exists(path) && pic.code != 0)
{ {
//下载卡图(177x254) //YGOMobile (177x254)
df.Download("http://android.ygopro.win/YGOMobile/pics/" + pic.code.ToString() + ".jpg", "expansions/pics/" + pic.code.ToString() + ".jpg"); df.Download("http://android.ygopro.win/YGOMobile/pics/" + pic.code.ToString() + ".jpg", "expansions/pics/" + pic.code.ToString() + ".jpg");
path = "expansions/pics/" + pic.code.ToString() + ".jpg"; path = "expansions/pics/" + pic.code.ToString() + ".jpg";
} }
#endif
if (!File.Exists(path) && pic.code != 0) if (!File.Exists(path) && pic.code != 0)
{ {
//下载卡图(421x614) //YGOPro2 (421x614)
df.Download("http://update.ygopro.win/ygopro2-data/picture/card/" + pic.code.ToString() + ".jpg", "picture/card/" + pic.code.ToString() + ".jpg"); df.Download("http://update.ygopro.win/ygopro2-data/picture/card/" + pic.code.ToString() + ".jpg", "picture/card/" + pic.code.ToString() + ".jpg");
path = "picture/card/" + pic.code.ToString() + ".jpg"; path = "picture/card/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path) && pic.code != 0) if (!File.Exists(path) && pic.code != 0)
{ {
//下载先行卡卡图(336x490) //YGOPro2 pre(336x490)
df.Download("http://update.ygopro.win/ygopro2-data/expansions/pics/" + pic.code.ToString() + ".jpg", "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"); df.Download("http://update.ygopro.win/ygopro2-data/expansions/pics/" + pic.code.ToString() + ".jpg", "picture/card/" + pic.code.ToString() + ".jpg");
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"; path = "picture/card/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path)) if (!File.Exists(path))
{ {
...@@ -944,7 +962,7 @@ public class GameTextureManager ...@@ -944,7 +962,7 @@ public class GameTextureManager
if (uiLoaded == false) if (uiLoaded == false)
{ {
uiLoaded = true; uiLoaded = true;
FileInfo[] fileInfos = (new DirectoryInfo("textures/ui")).GetFiles(); FileInfo[] fileInfos = (new DirectoryInfo("textures/ui")).GetFiles();//YGOMobile Paths
for (int i = 0; i < fileInfos.Length; i++) for (int i = 0; i < fileInfos.Length; i++)
{ {
if (fileInfos[i].Name.Length > 4) if (fileInfos[i].Name.Length > 4)
...@@ -953,7 +971,7 @@ public class GameTextureManager ...@@ -953,7 +971,7 @@ public class GameTextureManager
{ {
UIPictureResource r = new UIPictureResource(); UIPictureResource r = new UIPictureResource();
r.name = fileInfos[i].Name.Substring(0, fileInfos[i].Name.Length - 4); r.name = fileInfos[i].Name.Substring(0, fileInfos[i].Name.Length - 4);
r.data = UIHelper.getTexture2D("textures/ui/" + fileInfos[i].Name); r.data = UIHelper.getTexture2D("textures/ui/" + fileInfos[i].Name);//YGOMobile Paths
allUI.Add(r); allUI.Add(r);
} }
} }
...@@ -978,35 +996,35 @@ public class GameTextureManager ...@@ -978,35 +996,35 @@ public class GameTextureManager
internal static void initialize() internal static void initialize()
{ {
attack = UIHelper.getTexture2D("textures/attack.png"); attack = UIHelper.getTexture2D("textures/attack.png");//YGOMobile Paths
myBack = UIHelper.getTexture2D("textures/cover.jpg"); myBack = UIHelper.getTexture2D("textures/cover.jpg");//YGOMobile Paths
opBack = UIHelper.getTexture2D("textures/cover2.jpg"); opBack = UIHelper.getTexture2D("textures/cover2.jpg");//YGOMobile Paths
unknown = UIHelper.getTexture2D("textures/unknown.jpg"); unknown = UIHelper.getTexture2D("textures/unknown.jpg");//YGOMobile Paths
negated = UIHelper.getTexture2D("textures/negated.png"); negated = UIHelper.getTexture2D("textures/negated.png");//YGOMobile Paths
bar = UIHelper.getTexture2D("textures/duel/healthBar/bg.png"); bar = UIHelper.getTexture2D("textures/duel/healthBar/bg.png");//YGOMobile Paths
exBar = UIHelper.getTexture2D("textures/duel/healthBar/excited.png"); exBar = UIHelper.getTexture2D("textures/duel/healthBar/excited.png");//YGOMobile Paths
time = UIHelper.getTexture2D("textures/duel/healthBar/t.png"); time = UIHelper.getTexture2D("textures/duel/healthBar/t.png");//YGOMobile Paths
lp = UIHelper.getTexture2D("textures/duel/healthBar/lp.png"); lp = UIHelper.getTexture2D("textures/duel/healthBar/lp.png");//YGOMobile Paths
L = UIHelper.getTexture2D("textures/duel/L.png"); L = UIHelper.getTexture2D("textures/duel/L.png");//YGOMobile Paths
R = UIHelper.getTexture2D("textures/duel/R.png"); R = UIHelper.getTexture2D("textures/duel/R.png");//YGOMobile Paths
LINK = UIHelper.getTexture2D("textures/duel/link.png"); LINK = UIHelper.getTexture2D("textures/duel/link.png");//YGOMobile Paths
LINKm = UIHelper.getTexture2D("textures/duel/linkMask.png"); LINKm = UIHelper.getTexture2D("textures/duel/linkMask.png");//YGOMobile Paths
Chain = UIHelper.getTexture2D("textures/chain.png"); Chain = UIHelper.getTexture2D("textures/chain.png");//YGOMobile Paths
Mask = UIHelper.getTexture2D("textures/mask.png"); Mask = UIHelper.getTexture2D("textures/mask.png");//YGOMobile Paths
nt = UIHelper.getTexture2D("textures/duel/phase/nt.png"); nt = UIHelper.getTexture2D("textures/duel/phase/nt.png");//YGOMobile Paths
bp = UIHelper.getTexture2D("textures/duel/phase/bp.png"); bp = UIHelper.getTexture2D("textures/duel/phase/bp.png");//YGOMobile Paths
ep = UIHelper.getTexture2D("textures/duel/phase/ep.png"); ep = UIHelper.getTexture2D("textures/duel/phase/ep.png");//YGOMobile Paths
mp1 = UIHelper.getTexture2D("textures/duel/phase/mp1.png"); mp1 = UIHelper.getTexture2D("textures/duel/phase/mp1.png");//YGOMobile Paths
mp2 = UIHelper.getTexture2D("textures/duel/phase/mp2.png"); mp2 = UIHelper.getTexture2D("textures/duel/phase/mp2.png");//YGOMobile Paths
dp = UIHelper.getTexture2D("textures/duel/phase/dp.png"); dp = UIHelper.getTexture2D("textures/duel/phase/dp.png");//YGOMobile Paths
sp = UIHelper.getTexture2D("textures/duel/phase/sp.png"); sp = UIHelper.getTexture2D("textures/duel/phase/sp.png");//YGOMobile Paths
phase = UIHelper.getTexture2D("textures/duel/phase/phase.png"); phase = UIHelper.getTexture2D("textures/duel/phase/phase.png");//YGOMobile Paths
rs = UIHelper.getTexture2D("textures/duel/phase/rs.png"); rs = UIHelper.getTexture2D("textures/duel/phase/rs.png");//YGOMobile Paths
ts = UIHelper.getTexture2D("textures/duel/phase/ts.png"); ts = UIHelper.getTexture2D("textures/duel/phase/ts.png");//YGOMobile Paths
N = new Texture2D(10,10); N = new Texture2D(10,10);
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
...@@ -1019,7 +1037,7 @@ public class GameTextureManager ...@@ -1019,7 +1037,7 @@ public class GameTextureManager
N.Apply(); N.Apply();
try try
{ {
ColorUtility.TryParseHtmlString(File.ReadAllText("textures/duel/chainColor.txt"), out chainColor); ColorUtility.TryParseHtmlString(File.ReadAllText("textures/duel/chainColor.txt"), out chainColor);//YGOMobile Paths
} }
catch (Exception) catch (Exception)
{ {
......
...@@ -6,6 +6,7 @@ using System.IO; ...@@ -6,6 +6,7 @@ using System.IO;
using System.Net; using System.Net;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Net.Security; using System.Net.Security;
using UnityEngine;
public class HttpDldFile public class HttpDldFile
{ {
......
...@@ -1084,7 +1084,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1084,7 +1084,7 @@ public class DeckManager : ServantWithCardDescription
gameObjectDesk.transform.position = new Vector3(0, 0, 0); gameObjectDesk.transform.position = new Vector3(0, 0, 0);
gameObjectDesk.transform.eulerAngles = new Vector3(90, 0, 0); gameObjectDesk.transform.eulerAngles = new Vector3(90, 0, 0);
gameObjectDesk.transform.localScale = new Vector3(30, 30, 1); gameObjectDesk.transform.localScale = new Vector3(30, 30, 1);
gameObjectDesk.GetComponent<Renderer>().material.mainTexture = Program.GetTextureViaPath("textures/duel/deckTable.png"); gameObjectDesk.GetComponent<Renderer>().material.mainTexture = Program.GetTextureViaPath("textures/duel/deckTable.png");//YGOMobile Paths
//UIHelper.SetMaterialRenderingMode(gameObjectDesk.GetComponent<Renderer>().material, UIHelper.RenderingMode.Transparent); //UIHelper.SetMaterialRenderingMode(gameObjectDesk.GetComponent<Renderer>().material, UIHelper.RenderingMode.Transparent);
Rigidbody rigidbody = gameObjectDesk.AddComponent<Rigidbody>(); Rigidbody rigidbody = gameObjectDesk.AddComponent<Rigidbody>();
rigidbody.useGravity = false; rigidbody.useGravity = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment