public void RMSshow_position(string hashCode, int code, messageSystemValue atk, messageSystemValue def) { RMSshow_clear(); currentMShash = hashCode; currentMStype = messageSystemType.position; currentMSwindow = create ( Program.I().ES_position, MSentre(), Vector3.zero, true, Program.ui_main_2d, true, new Vector3(((float)Screen.height) / 700f, ((float)Screen.height) / 700f, ((float)Screen.height) / 700f) ); UIHelper.InterGameObject(currentMSwindow); UIHelper.registEvent(currentMSwindow, "atk_", ES_RMSpremono, atk); UIHelper.registEvent(currentMSwindow, "def_", ES_RMSpremono, def); cardPicLoader cardPicLoader_ = currentMSwindow.AddComponent <cardPicLoader>(); cardPicLoader_.code = code; cardPicLoader_.uiTexture = UIHelper.getByName <UITexture>(currentMSwindow, "atkPic_"); cardPicLoader_ = currentMSwindow.AddComponent <cardPicLoader>(); cardPicLoader_.code = code; cardPicLoader_.uiTexture = UIHelper.getByName <UITexture>(currentMSwindow, "defPic_"); }
public override void initialize() { gameObject = create ( Program.I().new_ui_cardDescription, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), new Vector3(0, 0, 0), true, Program.ui_back_ground_2d ); picLoader = gameObject.AddComponent <cardPicLoader>(); picLoader.code = 0; picLoader.uiTexture = UIHelper.getByName <UITexture>(gameObject, "pic_"); picLoader.loaded_code = -1; resizer = UIHelper.getByName <UIDragResize>(gameObject, "resizer"); underSprite = UIHelper.getByName <UITexture>(gameObject, "under_"); description = UIHelper.getByName <UITextList>(gameObject, "description_"); line = UIHelper.getByName(gameObject, "line"); UIHelper.registEvent(gameObject, "pre_", onPre); UIHelper.registEvent(gameObject, "next_", onNext); UIHelper.registEvent(gameObject, "big_", onb); UIHelper.registEvent(gameObject, "small_", ons); picSprite = UIHelper.getByName <UITexture>(gameObject, "pic_"); lineSprite = UIHelper.getByName <UISprite>(gameObject, "line"); try { description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24")); } catch (System.Exception e) { } read(); }
public override void initialize() { gameObject = create ( Program.I().new_ui_cardDescription, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), new Vector3(0, 0, 0), true, Program.ui_back_ground_2d ); picLoader = gameObject.AddComponent <cardPicLoader>(); picLoader.code = 0; picLoader.uiTexture = UIHelper.getByName <UITexture>(gameObject, "pic_"); picLoader.loaded_code = -1; resizer = UIHelper.getByName <UIDragResize>(gameObject, "resizer"); underSprite = UIHelper.getByName <UITexture>(gameObject, "under_"); description = UIHelper.getByName <UITextList>(gameObject, "description_"); cardShowerWidget = UIHelper.getByName <UIWidget>(gameObject, "card_shower"); monitor = UIHelper.getByName <UIPanel>(gameObject, "monitor"); deckPanel = gameObject.GetComponentInChildren <UIDeckPanel>(); line = UIHelper.getByName(gameObject, "line"); UIHelper.registEvent(gameObject, "pre_", onPre); UIHelper.registEvent(gameObject, "next_", onNext); UIHelper.registEvent(gameObject, "big_", onb); UIHelper.registEvent(gameObject, "small_", ons); UIHelper.registEvent(gameObject, "wiki_", onwiki); UIHelper.registEvent(gameObject, "reset_", onReset); picSprite = UIHelper.getByName <UITexture>(gameObject, "pic_"); lineSprite = UIHelper.getByName <UISprite>(gameObject, "line"); try { description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24")); } catch (System.Exception e) { } read(); myGraveStr = InterString.Get("我方墓地:"); myExtraStr = InterString.Get("我方额外:"); myBanishedStr = InterString.Get("我方除外:"); opGraveStr = InterString.Get("[8888FF]对方墓地:[-]"); opExtraStr = InterString.Get("[8888FF]对方额外:[-]"); opBanishedStr = InterString.Get("[8888FF]对方除外:[-]"); for (int i = 0; i < quickCards.Length; i++) { quickCards[i] = deckPanel.createCard(); quickCards[i].relayer(i); } monitor.gameObject.SetActive(false); }
public void RMSshow_position(string hashCode, int code, messageSystemValue atk, messageSystemValue def) { RMSshow_clear(); currentMShash = hashCode; currentMStype = messageSystemType.position; currentMSwindow = create ( Program.I().ES_position, MSentre(), Vector3.zero, true, Program.ui_main_2d, true, new Vector3(((float)Screen.height) / 700f, ((float)Screen.height) / 700f, ((float)Screen.height) / 700f) ); UIHelper.InterGameObject(currentMSwindow); 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 = atkpic; cardPicLoader_ = currentMSwindow.AddComponent <cardPicLoader>(); cardPicLoader_.code = (Int32.Parse(def.value) == (int)CardPosition.FaceDownDefence) ? 0 : code; cardPicLoader_.uiTexture = UIHelper.getByName <UITexture>(currentMSwindow, "defPic_"); }