Commit edfd3f53 authored by nanahira's avatar nanahira

Merge branch 'texture-manager' of git.mycard.moe:mycard/YGOProUnity_V2

parents d2f2ec91 82690ab4
Pipeline #5343 passed with stages
in 34 minutes and 27 seconds
......@@ -7,33 +7,35 @@ public class MonoCardInDeckManager : MonoBehaviour
public bool dying;
private bool bool_physicalON;
public Card cardData = new Card();
private Card _cardData = new Card();
private bool died;
private bool isDraging;
private Banlist loaded_banlist;
private int loadedPicCode;
private void Update()
public Card cardData
{
if (loadedPicCode != cardData.Id)
get => _cardData;
set
{
var pic = GameTextureManager.get(cardData.Id, GameTextureType.card_picture);
if (pic != null)
{
loadedPicCode = cardData.Id;
gameObject.transform.Find("face").GetComponent<Renderer>().material.mainTexture = pic;
}
_cardData = value;
LoadCard();
}
}
private async void LoadCard()
{
gameObject.transform.Find("face").GetComponent<Renderer>().material.mainTexture =
await GameTextureManager.GetCardPicture(_cardData.Id);
}
private void Update()
{
if (Program.I().deckManager.currentBanlist != loaded_banlist)
{
var ico = GetComponentInChildren<ban_icon>();
loaded_banlist = Program.I().deckManager.currentBanlist;
if (loaded_banlist != null)
ico.show(loaded_banlist.GetQuantity(cardData.Id));
else
ico.show(3);
ico.show(loaded_banlist?.GetQuantity(_cardData.Id) ?? 3);
}
if (isDraging) gameObject.transform.position += (getGoodPosition(4) - gameObject.transform.position) * 0.3f;
......
......@@ -3,43 +3,39 @@ using YGOSharp;
public class cardPicLoader : MonoBehaviour
{
public int loaded_code = -1;
public int code;
private int _code;
public Texture2D defaults;
public ban_icon ico;
public Collider coli;
public UITexture uiTexture;
public Banlist loaded_banlist;
public Card data { get; set; }
public int code
{
get => _code;
set
{
_code = value;
LoadCard();
}
}
private async void LoadCard()
{
uiTexture.mainTexture = await GameTextureManager.GetCardPicture(code);
if (uiTexture.mainTexture == null) return;
uiTexture.aspectRatio = (float) uiTexture.mainTexture.width / uiTexture.mainTexture.height;
uiTexture.forceWidth((int) (uiTexture.height * uiTexture.aspectRatio));
loaded_banlist = null;
}
private void Update()
{
if (coli != null)
if (Program.InputGetMouseButtonDown_0)
if (Program.pointedCollider == coli)
Program.I().cardDescription.setData(CardsManager.Get(code), GameTextureManager.myBack, "", true);
if (coli != null && Program.InputGetMouseButtonDown_0 && Program.pointedCollider == coli)
Program.I().cardDescription.setData(CardsManager.Get(_code), GameTextureManager.myBack, "", true);
if (Program.I().deckManager != null)
{
if (loaded_code != code)
{
var t = GameTextureManager.get(code, GameTextureType.card_picture, defaults);
if (t != null)
{
uiTexture.mainTexture = t;
uiTexture.aspectRatio = t.width / (float) t.height;
uiTexture.forceWidth((int) (uiTexture.height * uiTexture.aspectRatio));
loaded_code = code;
loaded_banlist = null;
}
}
if (loaded_banlist != Program.I().deckManager.currentBanlist)
{
loaded_banlist = Program.I().deckManager.currentBanlist;
......@@ -51,7 +47,7 @@ public class cardPicLoader : MonoBehaviour
return;
}
ico.show(loaded_banlist.GetQuantity(code));
ico.show(loaded_banlist.GetQuantity(_code));
}
}
}
......@@ -59,18 +55,11 @@ public class cardPicLoader : MonoBehaviour
public void clear()
{
loaded_code = 0;
code = 0;
_code = 0;
ico.show(3);
uiTexture.mainTexture = null;
}
public void reCode(int c)
{
loaded_code = 0;
code = c;
}
public void relayer(int l)
{
uiTexture.depth = 50 + l * 2;
......
using System;
using System.Collections.Generic;
using DefaultNamespace;
using DG.Tweening;
using UnityEngine;
public class gameUIbutton
......@@ -338,18 +340,16 @@ public class gameInfo : MonoBehaviour
((float) Program.I().ocgcore.life_1 > 0 ? Program.I().ocgcore.life_1 : 0).ToString();
me.api_name.text = Program.I().ocgcore.name_0_c;
opponent.api_name.text = Program.I().ocgcore.name_1_c;
me.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_0_c);
opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c);
iTween.MoveToLocal(me.api_healthBar.gameObject, new Vector3(
MyCard.LoadAvatar(Program.I().ocgcore.name_0_c, texture => me.api_face.mainTexture = texture);
MyCard.LoadAvatar(Program.I().ocgcore.name_1_c, texture => opponent.api_face.mainTexture = texture);
me.api_healthBar.transform.DOLocalMoveX(
me.api_healthBar.width - getRealLife(Program.I().ocgcore.life_0) / Program.I().ocgcore.lpLimit *
me.api_healthBar.width,
me.api_healthBar.gameObject.transform.localPosition.y,
me.api_healthBar.gameObject.transform.localPosition.z), 1f);
iTween.MoveToLocal(opponent.api_healthBar.gameObject, new Vector3(
me.api_healthBar.width, 1f);
opponent.api_healthBar.transform.DOLocalMoveX(
opponent.api_healthBar.width - getRealLife(Program.I().ocgcore.life_1) / Program.I().ocgcore.lpLimit *
opponent.api_healthBar.width,
opponent.api_healthBar.gameObject.transform.localPosition.y,
opponent.api_healthBar.gameObject.transform.localPosition.z), 1f);
opponent.api_healthBar.width, 1f);
instance_lab.Clear();
if (Program.I().ocgcore.confirmedCards.Count > 0) instance_lab.Add(GameStringHelper.yijingqueren);
foreach (var item in Program.I().ocgcore.confirmedCards) instance_lab.Add(item);
......
......@@ -12,9 +12,9 @@ public class handShower : MonoBehaviour
private void Start()
{
pics[0] = GameTextureManager.get("jiandao");
pics[1] = GameTextureManager.get("shitou");
pics[2] = GameTextureManager.get("bu");
pics[0] = GameTextureManager.GetUI("jiandao");
pics[1] = GameTextureManager.GetUI("shitou");
pics[2] = GameTextureManager.GetUI("bu");
texture_0.mainTexture = pics[me];
texture_1.mainTexture = pics[op];
GameObject_0.transform.position = Program.I().camera_main_2d
......
using System;
using DefaultNamespace;
using UnityEngine;
public class lazyPlayer : MonoBehaviour
......@@ -55,7 +56,7 @@ public class lazyPlayer : MonoBehaviour
setIfMe(false);
SetNotNull(false);
SetIFcanKick(false);
setName("");
SetName("");
}
private void OnPrepClicked()
......@@ -126,18 +127,11 @@ public class lazyPlayer : MonoBehaviour
return mIfMe;
}
public void setName(string name_)
public void SetName(string name)
{
mName = name_;
UILabel_name.text = name_;
try
{
face.mainTexture = UIHelper.getFace(name_);
}
catch (Exception)
{
Debug.LogError("setName");
}
mName = name;
UILabel_name.text = name;
MyCard.LoadAvatar(name, texture => face.mainTexture = texture);
}
public string getName()
......
......@@ -33,7 +33,7 @@ public class UITextureInspector : UIBasicSpriteEditor
startPath = sp2.stringValue;
if (startPath != "")
{
mTex.mainTexture = UIHelper.getTexture2D("texture/ui/" + startPath + ".png");
mTex.mainTexture = UIHelper.GetTexture2D("texture/ui/" + startPath + ".png");
}
Debug.Log("force delay read");
}
......
......@@ -329,14 +329,14 @@ public class UIButton : UIButtonColor
case State.Normal:
if (mTextureOutNormal != "")
{
texure2d.mainTexture = GameTextureManager.get(mTextureOutNormal);
texure2d.mainTexture = GameTextureManager.GetUI(mTextureOutNormal);
}
break;
case State.Hover:
case State.Pressed:
if (mTextureOutPressed != "")
{
texure2d.mainTexture = GameTextureManager.get(mTextureOutPressed);
texure2d.mainTexture = GameTextureManager.GetUI(mTextureOutPressed);
}
break;
}
......
......@@ -46,10 +46,7 @@ public class UITexture : UIBasicSprite
protected override void OnStart()
{
base.OnStart();
if (mOutPath != "")
{
mainTexture = GameTextureManager.get(mOutPath);
}
if (!string.IsNullOrEmpty(mOutPath)) mainTexture = GameTextureManager.GetUI(mOutPath);
}
public override Texture mainTexture
......
fileFormatVersion: 2
guid: f53581fb80be96f46b0cb1a267158562
timeCreated: 1480605668
licenseType: Pro
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Any:
second:
enabled: 1
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
......@@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: -1100
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
......
using System;
using UnityEngine;
using UnityEngine.Networking;
namespace DefaultNamespace
{
public class MyCard
{
public static void LoadAvatar(string username, Action<Texture2D> callback)
{
var request =
UnityWebRequestTexture.GetTexture($"https://sapi.moecube.com:444/accounts/users/{username}.png");
var operation = request.SendWebRequest();
operation.completed += _ =>
{
if (request.error != null)
{
Debug.LogWarning($"{request.url}: {request.error}");
return;
}
callback(((DownloadHandlerTexture) request.downloadHandler).texture);
};
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: e23192c6a90f4880a6558e4dad535f94
timeCreated: 1630859585
\ No newline at end of file
......@@ -8,22 +8,9 @@ public class BackGroundPic : Servant
public override void initialize()
{
backGround = Program.I().mod_simple_ngui_background_texture;
if (!File.Exists("texture/common/desk.jpg"))
{
backGround.SetActive(false);
return;
}
var file = new FileStream("texture/common/desk.jpg", FileMode.Open, FileAccess.Read);
file.Seek(0, SeekOrigin.Begin);
var data = new byte[file.Length];
file.Read(data, 0, (int) file.Length);
file.Close();
file.Dispose();
file = null;
var pic = new Texture2D(1920, 1080);
pic.LoadImage(data);
backGround.GetComponent<UITexture>().mainTexture = pic;
if (!File.Exists("texture/common/desk.jpg")) return;
backGround.SetActive(true);
backGround.GetComponent<UITexture>().mainTexture = UIHelper.GetTexture2D("texture/common/desk.jpg");
backGround.GetComponent<UITexture>().depth = -100;
}
......
......@@ -211,7 +211,6 @@ public class CardDescription : Servant
picLoader.code = card.Id;
picLoader.defaults = def;
picLoader.loaded_code = -1;
currentCard = card;
shiftCardShower(true);
Program.go(50, () => { shiftCardShower(true); });
......@@ -310,7 +309,7 @@ public class CardDescription : Servant
for (var i = 0; i < list.Count; i++)
{
var gp = UIHelper.get_hang_lie(i, eachLine);
quickCards[currentCardIndex].reCode(list[i].get_data().Id);
quickCards[currentCardIndex].code = list[i].get_data().Id;
quickCards[currentCardIndex].transform.localPosition =
new Vector3(beginX + 44 * gp.y, beginY - 60 * gp.x, 0);
currentCardIndex++;
......
......@@ -3,8 +3,10 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Rendering;
using YGOSharp.OCGWrapper.Enums;
......@@ -703,7 +705,7 @@ public static class UIHelper
if (!faces.ContainsKey(name))
try
{
faces.Add(name, getTexture2D("texture/face/" + fileInfos[i].Name));
faces.Add(name, GetTexture2D("texture/face/" + fileInfos[i].Name));
}
catch (Exception e)
{
......@@ -730,30 +732,25 @@ public static class UIHelper
return Program.I().face.faces[sum];
}
public static Texture2D getTexture2D(string path)
public static Texture2D GetTexture2D(string path)
{
Texture2D pic = null;
try
{
if (!File.Exists(path)) return null;
var file = new FileStream(path, FileMode.Open, FileAccess.Read);
file.Seek(0, SeekOrigin.Begin);
var data = new byte[file.Length];
file.Read(data, 0, (int) file.Length);
file.Close();
file.Dispose();
file = null;
pic = new Texture2D(1024, 600);
pic.LoadImage(data);
}
catch (Exception e)
{
Debug.Log(e);
}
var pic = new Texture2D(0, 0);
pic.LoadImage(File.ReadAllBytes(path));
return pic;
}
public static async Task<Texture2D> GetTexture2DAsync(string path)
{
var pic = new Texture2D(0, 0);
// Unity < 2021.2
var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true);
var data = new byte[stream.Length];
await stream.ReadAsync(data, 0, (int) stream.Length);
pic.LoadImage(data);
// Unity >= 2021.2
// pic.LoadImage(await File.ReadAllBytesAsync(path));
return pic;
}
internal static void shiftButton(UIButton btn, bool enabled)
{
......
......@@ -176,7 +176,7 @@ public class GameField : OCGobject
{
if (File.Exists("texture/duel/field.png"))
{
var textureField = UIHelper.getTexture2D("texture/duel/field.png");
var textureField = UIHelper.GetTexture2D("texture/duel/field.png");
var textureFieldSliced = UIHelper.sliceField(textureField);
leftT.mainTexture = textureFieldSliced[0];
midT.mainTexture = textureFieldSliced[1];
......@@ -197,7 +197,7 @@ public class GameField : OCGobject
{
if (File.Exists("texture/duel/newfield.png"))
{
var textureField = UIHelper.getTexture2D("texture/duel/newfield.png");
var textureField = UIHelper.GetTexture2D("texture/duel/newfield.png");
var textureFieldSliced = UIHelper.sliceField(textureField);
leftT.mainTexture = textureFieldSliced[0];
midT.mainTexture = textureFieldSliced[1];
......@@ -494,8 +494,8 @@ public class GameField : OCGobject
break;
}
if (tex == null) tex = UIHelper.getTexture2D("picture/field/" + code + ".png");
if (tex == null) tex = UIHelper.getTexture2D("picture/field/" + code + ".jpg");
if (tex == null) tex = UIHelper.GetTexture2D("picture/field/" + code + ".png");
if (tex == null) tex = UIHelper.GetTexture2D("picture/field/" + code + ".jpg");
if (tex != null)
{
UIHelper.getByName<UITexture>(gameObject, "field_" + player).mainTexture = tex;
......@@ -573,9 +573,7 @@ public class GameField : OCGobject
if (Ocgcore.inSkiping) return;
if (only) destroy(big_string);
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.I().ui_main_2d, true,
new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize,
Screen.height / 1000f * Program.fieldSize));
Program.I().ui_main_2d, true, Utils.UIHeight() / 1000f * Program.fieldSize * Vector3.one);
big_string.GetComponentInChildren<UITexture>().mainTexture = tex;
Program.I().ocgcore.Sleep(40);
big_string.AddComponent<animation_screen_lock2>();
......
......@@ -55,7 +55,7 @@ public class Ocgcore : ServantWithCardDescription
private readonly List<gameCard> cardsSelected = new List<gameCard>();
private bool clearAllShowedB;
private bool clearTimeFlag;
private long code_for_show;
private int code_for_show;
public Condition condition = Condition.duel;
public List<string> confirmedCards = new List<string>();
......@@ -474,11 +474,11 @@ public class Ocgcore : ServantWithCardDescription
Arrow.gameObject.SetActive(false);
replayShowAll = Config.Get("replayShowAll", "0") != "0";
reportShowAll = Config.Get("reportShowAll", "0") != "0";
gameInfo = Program.I().new_ui_gameInfo;
gameInfo.ini();
UIHelper.InterGameObject(gameInfo.gameObject);
shiftCondition(Condition.duel);
......@@ -7586,7 +7586,7 @@ public class Ocgcore : ServantWithCardDescription
if (leftExcited)
if (Input.GetKey(KeyCode.A) == false)
leftExcited = false;
//gameInfo.keepChain_set(false);
//gameInfo.keepChain_set(false);
}
base.ES_mouseUpEmpty();
......@@ -7603,7 +7603,7 @@ public class Ocgcore : ServantWithCardDescription
if (leftExcited)
if (Input.GetKey(KeyCode.A) == false)
leftExcited = false;
//gameInfo.keepChain_set(false);
//gameInfo.keepChain_set(false);
base.ES_mouseUpGameObject(gameObject);
}
......@@ -7613,7 +7613,7 @@ public class Ocgcore : ServantWithCardDescription
if (rightExcited)
if (Input.GetKey(KeyCode.S) == false)
rightExcited = false;
//gameInfo.ignoreChain_set(false);
//gameInfo.ignoreChain_set(false);
if (gameInfo.queryHashedButton("sendSelected"))
{
sendSelectedCards();
......@@ -7655,37 +7655,23 @@ public class Ocgcore : ServantWithCardDescription
target.animation_confirm_screenCenter(new Vector3(-30, 0, 0), 0.2f, 0.5f);
}
public void animation_show_card_code(long code)
public void animation_show_card_code(int code)
{
code_for_show = code;
AddUpdateAction_s(animation_show_card_code_handler);
animation_show_card_code_handler();
Sleep(30);
}
private void animation_show_card_code_handler()
private async void animation_show_card_code_handler()
{
var texture = GameTextureManager.get(code_for_show, GameTextureType.card_picture);
if (texture != null)
{
RemoveUpdateAction_s(animation_show_card_code_handler);
//Vector3 position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(getScreenCenter(), Screen.height / 2f, 10));
//GameObject obj = create_s(Program.I().mod_simple_quad);
//obj.AddComponent<animation_screen_lock>().screen_point = new Vector3(getScreenCenter(), Screen.height / 2f, 6);
//obj.transform.eulerAngles = new Vector3(60, 0, 0);
//obj.GetComponent<Renderer>().material.mainTexture = texture;
//obj.transform.localPosition = position;
//obj.transform.localScale = new Vector3(3.2f, 4.6f, 1f);
//destroy(obj, 1f);
var shower =
create(Program.I().Pro1_CardShower, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.I().ui_main_2d).GetComponent<pro1CardShower>();
shower.card.mainTexture = texture;
shower.mask.mainTexture = GameTextureManager.Mask;
shower.disable.mainTexture = GameTextureManager.negated;
shower.gameObject.transform.localScale =
new Vector3(Screen.height / 650f, Screen.height / 650f, Screen.height / 650f);
destroy(shower.gameObject, 0.5f);
}
var shower =
create(Program.I().Pro1_CardShower, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.I().ui_main_2d).GetComponent<pro1CardShower>();
shower.card.mainTexture = await GameTextureManager.GetCardPicture(code_for_show);
shower.mask.mainTexture = GameTextureManager.Mask;
shower.disable.mainTexture = GameTextureManager.negated;
shower.gameObject.transform.localScale = Utils.UIHeight() / 650f * Vector3.one;
destroy(shower.gameObject, 0.5f);
}
private class linkMask
......
......@@ -684,7 +684,7 @@ public class Room : WindowServantSP
else
{
realPlayers[i].SetNotNull(true);
realPlayers[i].setName(roomPlayers[i].name);
realPlayers[i].SetName(roomPlayers[i].name);
realPlayers[i].SetIFcanKick(is_host && i != selftype);
realPlayers[i].setIfMe(i == selftype);
realPlayers[i].setIfprepared(roomPlayers[i].prep);
......
......@@ -261,7 +261,7 @@ public class selectDeck : WindowServantSP
private void printSelected()
{
GameTextureManager.clearUnloaded();
// GameTextureManager.clearUnloaded();
Deck deck;
DeckManager.FromYDKtoCodedDeck("deck/" + deckSelected + ".ydk", out deck);
var mainAll = 0;
......@@ -287,7 +287,7 @@ public class selectDeck : WindowServantSP
if ((c.Type & (uint) CardType.Monster) > 0) mainMonster++;
if ((c.Type & (uint) CardType.Spell) > 0) mainSpell++;
if ((c.Type & (uint) CardType.Trap) > 0) mainTrap++;
quickCards[currentIndex].reCode(item);
quickCards[currentIndex].code = item;
var v = UIHelper.get_hang_lieArry(mainAll - 1, hangshu);
quickCards[currentIndex].transform.localPosition = new Vector3
(
......@@ -307,7 +307,7 @@ public class selectDeck : WindowServantSP
if ((c.Type & (uint) CardType.Monster) > 0) sideMonster++;
if ((c.Type & (uint) CardType.Spell) > 0) sideSpell++;
if ((c.Type & (uint) CardType.Trap) > 0) sideTrap++;
quickCards[currentIndex].reCode(item);
quickCards[currentIndex].code = item;
quickCards[currentIndex].transform.localPosition = new Vector3
(
-176.3f + UIHelper.get_left_right_indexZuo(0, 352f, sideAll - 1, deck.Side.Count, 10)
......@@ -327,7 +327,7 @@ public class selectDeck : WindowServantSP
if ((c.Type & (uint) CardType.Synchro) > 0) extraSync++;
if ((c.Type & (uint) CardType.Xyz) > 0) extraXyz++;
if ((c.Type & (uint) CardType.Link) > 0) extraLink++;
quickCards[currentIndex].reCode(item);
quickCards[currentIndex].code = item;
quickCards[currentIndex].transform.localPosition = new Vector3
(
-176.3f + UIHelper.get_left_right_indexZuo(0, 352f, extraAll - 1, deck.Extra.Count, 10)
......
using System;
using System.Collections.Generic;
using DefaultNamespace;
using DG.Tweening;
using UnityEngine;
using UnityEngine.Assertions;
......@@ -644,12 +645,12 @@ public class Servant
defbutton.transform.localPosition = new Vector3(62.8f, 0f, 0f);
}
var cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader_.code = code;
cardPicLoader_.uiTexture = atkpic;
cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader_.code = int.Parse(def.value) == (int) CardPosition.FaceDownDefence ? 0 : code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_");
var cardPicLoader = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader.uiTexture = atkpic;
cardPicLoader.code = code;
cardPicLoader = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_");
cardPicLoader.code = int.Parse(def.value) == (int) CardPosition.FaceDownDefence ? 0 : code;
}
public void RMSshow_tp(string hashCode, messageSystemValue jiandao, messageSystemValue shitou,
......@@ -711,7 +712,8 @@ public class Servant
Program.I().ui_main_2d
);
UIHelper.InterGameObject(currentMSwindow);
UIHelper.getByName<UITexture>(currentMSwindow, "face_").mainTexture = UIHelper.getFace(name);
MyCard.LoadAvatar(name,
texture => UIHelper.getByName<UITexture>(currentMSwindow, "face_").mainTexture = texture);
UIHelper.registEvent(currentMSwindow, "yes_", ES_RMSpremono, new messageSystemValue());
}
......
......@@ -799,19 +799,18 @@ public class DeckManager : ServantWithCardDescription
});
}
private GameObject itemOnListProducer(string[] Args)
private GameObject itemOnListProducer(string[] args)
{
GameObject returnValue = null;
returnValue = create(Program.I().new_ui_cardOnSearchList, Vector3.zero, Vector3.zero, false,
var returnValue = create(Program.I().new_ui_cardOnSearchList, Vector3.zero, Vector3.zero, false,
Program.I().ui_back_ground_2d);
UIHelper.getRealEventGameObject(returnValue).name = Args[0];
UIHelper.trySetLableText(returnValue, Args[2]);
var cardPicLoader_ = UIHelper.getRealEventGameObject(returnValue).AddComponent<cardPicLoader>();
cardPicLoader_.code = int.Parse(Args[0]);
cardPicLoader_.data = CardsManager.Get(int.Parse(Args[0]));
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(returnValue, "pic_");
cardPicLoader_.ico = UIHelper.getByName<ban_icon>(returnValue);
cardPicLoader_.ico.show(3);
UIHelper.getRealEventGameObject(returnValue).name = args[0];
UIHelper.trySetLableText(returnValue, args[2]);
var cardPicLoader = UIHelper.getRealEventGameObject(returnValue).AddComponent<cardPicLoader>();
cardPicLoader.uiTexture = UIHelper.getByName<UITexture>(returnValue, "pic_");
cardPicLoader.code = int.Parse(args[0]);
cardPicLoader.data = CardsManager.Get(int.Parse(args[0]));
cardPicLoader.ico = UIHelper.getByName<ban_icon>(returnValue);
cardPicLoader.ico.show(3);
return returnValue;
}
......
......@@ -20,12 +20,12 @@ public class ban_icon : MonoBehaviour
UITexture t = gameObject.GetComponent<UITexture>();
if (t != null)
{
t.mainTexture = GameTextureManager.get("ban_" + i.ToString());
t.mainTexture = GameTextureManager.GetUI("ban_" + i.ToString());
}
else
{
Renderer r = GetComponent<Renderer>();
r.material.mainTexture = GameTextureManager.get("ban_" + i.ToString());
r.material.mainTexture = GameTextureManager.GetUI("ban_" + i.ToString());
}
}
}
......@@ -60,6 +60,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
......@@ -376,6 +377,19 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable:
all_button_6: 21300012
all_button_3: 21300006
all_button_4: 21300008
all_button_11: 21300022
all_button_2: 21300004
all_button_1: 21300002
all_button_10: 21300020
all_button_8: 21300016
all_button_7: 21300014
all_button_0: 21300000
all_button_5: 21300010
all_button_9: 21300018
spritePackingTag: button_ocgcore
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
......
......@@ -144,6 +144,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
......@@ -1048,6 +1049,47 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable:
num_29: 21300058
num_2: 21300004
num_18: 21300036
num_25: 21300050
num_10: 21300020
num_19: 21300038
num_15: 21300030
num_20: 21300040
num_38: 21300076
num_3: 21300006
num_30: 21300060
num_16: 21300032
num_1: 21300002
num_37: 21300074
num_22: 21300044
num_11: 21300022
num_26: 21300052
num_39: 21300078
num_0: 21300000
num_23: 21300046
num_32: 21300064
num_9: 21300018
num_14: 21300028
num_27: 21300054
num_24: 21300048
num_12: 21300024
num_5: 21300010
num_21: 21300042
num_34: 21300068
num_31: 21300062
num_8: 21300016
num_28: 21300056
num_17: 21300034
num_13: 21300026
num_36: 21300072
num_6: 21300012
num_33: 21300066
num_35: 21300070
num_7: 21300014
num_4: 21300008
spritePackingTag: ocgcore_numbers
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
......
......@@ -84,6 +84,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
......@@ -568,6 +569,27 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable:
num2_11: 21300022
num2_6: 21300012
num2_8: 21300016
num2_9: 21300018
num2_5: 21300010
num2_17: 21300034
num2_18: 21300036
num2_1: 21300002
num2_0: 21300000
num2_12: 21300024
num2_10: 21300020
num2_14: 21300028
num2_15: 21300030
num2_4: 21300008
num2_19: 21300038
num2_13: 21300026
num2_16: 21300032
num2_3: 21300006
num2_2: 21300004
num2_7: 21300014
spritePackingTag: num2
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
......
......@@ -75,6 +75,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
......@@ -349,6 +350,17 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable:
Default Sprite Atlas_8: 21300030
Default Sprite Atlas_6: 21300016
Default Sprite Atlas_2: 21300010
Default Sprite Atlas_3: 21300006
Default Sprite Atlas_5: 21300026
Default Sprite Atlas_7: 21300028
Default Sprite Atlas_9: 21300032
Default Sprite Atlas_0: 21300024
Default Sprite Atlas_1: 21300020
Default Sprite Atlas_4: 21300022
spritePackingTag:
pSDRemoveMatte: 1
pSDShowRemoveMatteOption: 1
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!387306366 &1
MemorySettings:
m_ObjectHideFlags: 0
m_EditorMemorySettings:
m_MainAllocatorBlockSize: -1
m_ThreadAllocatorBlockSize: -1
m_MainGfxBlockSize: -1
m_ThreadGfxBlockSize: -1
m_CacheBlockSize: -1
m_TypetreeBlockSize: -1
m_ProfilerBlockSize: -1
m_ProfilerEditorBlockSize: -1
m_BucketAllocatorGranularity: -1
m_BucketAllocatorBucketsCount: -1
m_BucketAllocatorBlockSize: -1
m_BucketAllocatorBlockCount: -1
m_ProfilerBucketAllocatorGranularity: -1
m_ProfilerBucketAllocatorBucketsCount: -1
m_ProfilerBucketAllocatorBlockSize: -1
m_ProfilerBucketAllocatorBlockCount: -1
m_TempAllocatorSizeMain: -1
m_JobTempAllocatorBlockSize: -1
m_BackgroundJobTempAllocatorBlockSize: -1
m_JobTempAllocatorReducedBlockSize: -1
m_TempAllocatorSizeGIBakingWorker: -1
m_TempAllocatorSizeNavMeshWorker: -1
m_TempAllocatorSizeAudioWorker: -1
m_TempAllocatorSizeCloudWorker: -1
m_TempAllocatorSizeGfx: -1
m_TempAllocatorSizeJobWorker: -1
m_TempAllocatorSizeBackgroundWorker: -1
m_TempAllocatorSizePreloadManager: -1
m_PlatformMemorySettings: {}
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