Commit 9ecc9e8e authored by mercury233's avatar mercury233

fix select position

parent ccb53ca7
using UnityEngine;
using System;
using System.Collections.Generic;
using YGOSharp.OCGWrapper.Enums;
public class Servant
{
public GameObject gameObject;
......@@ -693,14 +695,24 @@ public class Servant
UIHelper.registEvent(currentMSwindow, "atk_", ES_RMSpremono, atk);
UIHelper.registEvent(currentMSwindow, "def_", ES_RMSpremono, def);
UITexture atkpic = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_");
UIButton defbutton = UIHelper.getByName<UIButton>(currentMSwindow, "def_");
if (Int32.Parse(atk.value) == (int)CardPosition.FaceUpDefence)
{
atkpic.transform.localRotation = Quaternion.Euler(0f, 0f, 90f);
defbutton.transform.localPosition = new Vector3(72.8f, 2f, 0f);
}
else
{
atkpic.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
defbutton.transform.localPosition = new Vector3(62.8f, 0f, 0f);
}
cardPicLoader cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader_.code = code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_");
cardPicLoader_.uiTexture = atkpic;
cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
if (Int32.Parse(def.value) != 8)
cardPicLoader_.code = code;
else
cardPicLoader_.code = 0;
cardPicLoader_.code = (Int32.Parse(def.value) == (int)CardPosition.FaceDownDefence) ? 0 : code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_");
}
......
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