Commit af0f2863 authored by Unicorn369's avatar Unicorn369

Modify notes

parent 484a29ad
...@@ -40,6 +40,7 @@ AI_core_vs2017solution/bin/ ...@@ -40,6 +40,7 @@ AI_core_vs2017solution/bin/
AI_core_vs2017solution/obj/ AI_core_vs2017solution/obj/
AI_core_vs2017solution/build/android/libs/ AI_core_vs2017solution/build/android/libs/
AI_core_vs2017solution/build/android/obj/ AI_core_vs2017solution/build/android/obj/
Assets/Plugins/Android/libs/x86*
# ygopro # ygopro
cdb/ cdb/
......
...@@ -25,7 +25,6 @@ public class GameTextureManager ...@@ -25,7 +25,6 @@ public class GameTextureManager
static HttpDldFile df = new HttpDldFile(); static HttpDldFile df = new HttpDldFile();
private static readonly Semaphore _sem = new Semaphore(30, 30);
public class BitmapHelper public class BitmapHelper
{ {
public System.Drawing.Color[,] colors = null; public System.Drawing.Color[,] colors = null;
...@@ -228,18 +227,15 @@ public class GameTextureManager ...@@ -228,18 +227,15 @@ public class GameTextureManager
} }
if (pic.type == GameTextureType.card_feature) if (pic.type == GameTextureType.card_feature)
{ {
_sem.WaitOne(); ProcessingCardFeature(pic);
new Thread(() => ProcessingCardFeature(pic)).Start();
} }
if (pic.type == GameTextureType.card_picture) if (pic.type == GameTextureType.card_picture)
{ {
_sem.WaitOne(); ProcessingCardPicture(pic);
new Thread(() => ProcessingCardPicture(pic)).Start();
} }
if (pic.type == GameTextureType.card_verticle_drawing) if (pic.type == GameTextureType.card_verticle_drawing)
{ {
_sem.WaitOne(); ProcessingVerticleDrawing(pic);
new Thread(() => ProcessingVerticleDrawing(pic)).Start();
} }
} }
} }
...@@ -258,6 +254,10 @@ public class GameTextureManager ...@@ -258,6 +254,10 @@ public class GameTextureManager
if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png")) if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png"))
{ {
string path = "picture/closeup/" + pic.code.ToString() + ".png"; string path = "picture/closeup/" + pic.code.ToString() + ".png";
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
BitmapHelper bitmap = new BitmapHelper(path); BitmapHelper bitmap = new BitmapHelper(path);
int left; int left;
...@@ -290,11 +290,10 @@ public class GameTextureManager ...@@ -290,11 +290,10 @@ public class GameTextureManager
caculateK(pic); caculateK(pic);
/* /*
* 以上处理iOS平台无法正常使用 * 以上处理移动平台无法正常使用
* Android已成功编译 libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
**/ */
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
byte[] data; byte[] data;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read)) using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{ {
...@@ -392,10 +391,6 @@ public class GameTextureManager ...@@ -392,10 +391,6 @@ public class GameTextureManager
{ {
Debug.Log("e 1" + e.ToString()); Debug.Log("e 1" + e.ToString());
} }
finally
{
_sem.Release();
}
} }
private static void caculateK(PictureResource pic) private static void caculateK(PictureResource pic)
...@@ -594,6 +589,10 @@ public class GameTextureManager ...@@ -594,6 +589,10 @@ public class GameTextureManager
string path = "picture/closeup/" + pic.code.ToString() + ".png"; string path = "picture/closeup/" + pic.code.ToString() + ".png";
if (!File.Exists(path)) if (!File.Exists(path))
{ {
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
path = "picture/card/" + pic.code.ToString() + ".png"; path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path)) if (!File.Exists(path))
...@@ -630,11 +629,10 @@ public class GameTextureManager ...@@ -630,11 +629,10 @@ public class GameTextureManager
//pic.autoMade = true; //pic.autoMade = true;
/* /*
* 以上处理iOS平台无法正常使用 * 以上处理移动平台无法正常使用
* Android已成功编译libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
**/ */
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
path = "picture/null.png"; path = "picture/null.png";
byte[] data; byte[] data;
...@@ -649,6 +647,10 @@ public class GameTextureManager ...@@ -649,6 +647,10 @@ public class GameTextureManager
} }
else else
{ {
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
BitmapHelper bitmap = new BitmapHelper(path); BitmapHelper bitmap = new BitmapHelper(path);
int left; int left;
...@@ -703,11 +705,10 @@ public class GameTextureManager ...@@ -703,11 +705,10 @@ public class GameTextureManager
caculateK(pic); caculateK(pic);
/* /*
* 以上处理iOS平台无法正常使用 * 以上处理移动平台无法正常使用
* Android已成功编译libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
**/ */
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
byte[] data; byte[] data;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read)) using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{ {
...@@ -728,10 +729,6 @@ public class GameTextureManager ...@@ -728,10 +729,6 @@ public class GameTextureManager
{ {
Debug.Log("e 3" + e.ToString()); Debug.Log("e 3" + e.ToString());
} }
finally
{
_sem.Release();
}
} }
private static void softVtype(PictureResource pic, float si) private static void softVtype(PictureResource pic, float si)
...@@ -851,10 +848,6 @@ public class GameTextureManager ...@@ -851,10 +848,6 @@ public class GameTextureManager
catch (Exception e) catch (Exception e)
{ {
Debug.Log("e 2" + e.ToString()); Debug.Log("e 2" + e.ToString());
}
finally
{
_sem.Release();
} }
} }
......
...@@ -10,7 +10,6 @@ using UnityEngine; ...@@ -10,7 +10,6 @@ using UnityEngine;
public class HttpDldFile public class HttpDldFile
{ {
private readonly System.Threading.Semaphore semaphore = new System.Threading.Semaphore(6, 6);
public bool Download(string url, string filename) public bool Download(string url, string filename)
{ {
bool flag = false; bool flag = false;
...@@ -33,7 +32,6 @@ public class HttpDldFile ...@@ -33,7 +32,6 @@ public class HttpDldFile
{ {
client.Timeout = 3500; client.Timeout = 3500;
} }
semaphore.WaitOne();
client.DownloadFile(new Uri(url), filename + ".tmp"); client.DownloadFile(new Uri(url), filename + ".tmp");
} }
flag = true; flag = true;
...@@ -47,10 +45,6 @@ public class HttpDldFile ...@@ -47,10 +45,6 @@ public class HttpDldFile
{ {
flag = false; flag = false;
} }
finally
{
semaphore.Release();
}
return flag; return flag;
} }
public static bool MyRemoteCertificateValidationCallback(System.Object sender, public static bool MyRemoteCertificateValidationCallback(System.Object sender,
......
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