Commit af0f2863 authored by Unicorn369's avatar Unicorn369

Modify notes

parent 484a29ad
......@@ -40,6 +40,7 @@ AI_core_vs2017solution/bin/
AI_core_vs2017solution/obj/
AI_core_vs2017solution/build/android/libs/
AI_core_vs2017solution/build/android/obj/
Assets/Plugins/Android/libs/x86*
# ygopro
cdb/
......
......@@ -25,7 +25,6 @@ public class GameTextureManager
static HttpDldFile df = new HttpDldFile();
private static readonly Semaphore _sem = new Semaphore(30, 30);
public class BitmapHelper
{
public System.Drawing.Color[,] colors = null;
......@@ -228,18 +227,15 @@ public class GameTextureManager
}
if (pic.type == GameTextureType.card_feature)
{
_sem.WaitOne();
new Thread(() => ProcessingCardFeature(pic)).Start();
ProcessingCardFeature(pic);
}
if (pic.type == GameTextureType.card_picture)
{
_sem.WaitOne();
new Thread(() => ProcessingCardPicture(pic)).Start();
ProcessingCardPicture(pic);
}
if (pic.type == GameTextureType.card_verticle_drawing)
{
_sem.WaitOne();
new Thread(() => ProcessingVerticleDrawing(pic)).Start();
ProcessingVerticleDrawing(pic);
}
}
}
......@@ -258,6 +254,10 @@ public class GameTextureManager
if (File.Exists("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
BitmapHelper bitmap = new BitmapHelper(path);
int left;
......@@ -290,11 +290,10 @@ public class GameTextureManager
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;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{
......@@ -392,10 +391,6 @@ public class GameTextureManager
{
Debug.Log("e 1" + e.ToString());
}
finally
{
_sem.Release();
}
}
private static void caculateK(PictureResource pic)
......@@ -594,6 +589,10 @@ public class GameTextureManager
string path = "picture/closeup/" + pic.code.ToString() + ".png";
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
path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path))
......@@ -630,11 +629,10 @@ public class GameTextureManager
//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";
byte[] data;
......@@ -649,6 +647,10 @@ public class GameTextureManager
}
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
BitmapHelper bitmap = new BitmapHelper(path);
int left;
......@@ -703,11 +705,10 @@ public class GameTextureManager
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;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{
......@@ -728,10 +729,6 @@ public class GameTextureManager
{
Debug.Log("e 3" + e.ToString());
}
finally
{
_sem.Release();
}
}
private static void softVtype(PictureResource pic, float si)
......@@ -851,10 +848,6 @@ public class GameTextureManager
catch (Exception e)
{
Debug.Log("e 2" + e.ToString());
}
finally
{
_sem.Release();
}
}
......
......@@ -10,7 +10,6 @@ using UnityEngine;
public class HttpDldFile
{
private readonly System.Threading.Semaphore semaphore = new System.Threading.Semaphore(6, 6);
public bool Download(string url, string filename)
{
bool flag = false;
......@@ -33,7 +32,6 @@ public class HttpDldFile
{
client.Timeout = 3500;
}
semaphore.WaitOne();
client.DownloadFile(new Uri(url), filename + ".tmp");
}
flag = true;
......@@ -47,10 +45,6 @@ public class HttpDldFile
{
flag = false;
}
finally
{
semaphore.Release();
}
return flag;
}
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