// Start is called before the first frame update void Start() { editAsk = GameObject.Find("EventSystem").GetComponent <AskPanel>(); editenemiesCardList = GameObject.Find("enemytchoose").GetComponent <EnemiesCard>(); editManager = GameObject.Find("EventSystem").GetComponent <GameManager>(); editMyCard = GameObject.Find("myCard").GetComponent <MyCard>(); }
public void OnClickDelete() { AskPanel askPanel = Main.Instance.MakeAskPanel(); askPanel.Open("친구 삭제", "정말 친구를 삭제하시겠습니까?", OnClickFriendDeleteYes, null, raw_friend_id); askPanel.SetEventTarget(gameObject); }
// Use this for initialization void Start() { askPanel = transform.FindChild("slot").GetComponent <AskPanel>(); askPanel.initPanel(); audio = GetComponent <AudioSource>(); //Calculus the distance between switches SpriteRenderer sr_aux = switchPrefab.GetComponent <SpriteRenderer>(); distance = (sr_aux.sprite.rect.width * switchPrefab.transform.localScale.y / sr_aux.sprite.pixelsPerUnit) * 1.3f; switches = new SwitchMachine[5]; switches[0] = (Instantiate(switchPrefab, Vector3.zero, Quaternion.identity) as GameObject).GetComponent <SwitchMachine>(); switches[1] = (Instantiate(switchPrefab, Vector3.zero, Quaternion.identity) as GameObject).GetComponent <SwitchMachine>(); switches[2] = (Instantiate(switchPrefab, Vector3.zero, Quaternion.identity) as GameObject).GetComponent <SwitchMachine>(); switches[3] = (Instantiate(switchPrefab, Vector3.zero, Quaternion.identity) as GameObject).GetComponent <SwitchMachine>(); switches[4] = (Instantiate(switchPrefab, Vector3.zero, Quaternion.identity) as GameObject).GetComponent <SwitchMachine>(); foreach (SwitchMachine sm in switches) { sm.transform.parent = this.transform; sm.transform.localPosition = Vector3.zero; sm.gameObject.SetActive(false); } initSwitches(); }
/* * public void OnClickPresentSendButton() * { * List<FriendButton> selectedLst = GetPresentSelectedCheckBoxs(); * * if (selectedLst.Count > 0) * { * AskPanel ask = Main.Instance.MakeAskPanel(); * StringBuilder sb = new StringBuilder(); * * for (int i = 0; i < selectedLst.Count; i++) * { * sb.Append(selectedLst[i].raw_friend_id); * if(i != selectedLst.Count - 1) * sb.Append(", "); * } * sb.Append(" 친구(들)에게 선물을 보내겠습니까?"); * ask.Open("선물 보내기", sb.ToString(), SendPresentYes, null); * * if (ask.GetDescribeLabelSize().y >= 350) * { * ask.ScrollViewResetPosition(); * } * } * // No check box * else * { * AskPanel confirm = Main.Instance.MakeConfirmPanel(); * confirm.Open("선물 보내기", "선택된 친구가 없습니다."); * } * } */ public void OnClickPresentSendButton2() { List <FriendData> selectedLst = GetPresentSelectedCheckBoxs2(); if (selectedLst.Count > 0) { AskPanel ask = Main.Instance.MakeAskPanel(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < selectedLst.Count; i++) { sb.Append(selectedLst[i]._name); if (i != selectedLst.Count - 1) { sb.Append(", "); } } sb.Append(" 친구(들)에게 선물을 보내겠습니까?"); ask.Open("선물 보내기", sb.ToString(), SendPresentYes, null); if (ask.GetDescribeLabelSize().y >= 350) { ask.ScrollViewResetPosition(); } } // No check box else { AskPanel confirm = Main.Instance.MakeConfirmPanel(); confirm.Open("선물 보내기", "선택된 친구가 없습니다."); } }
public AskPanel MakeConfirmPanel() { AskPanel askPanel = MakeObjectToTarget("UI/Confirm_Panel").GetComponent <AskPanel>(); askPanel.gameObject.SetActive(true); return(askPanel); }
// Start is called before the first frame update void Start() { editAsk = GameObject.Find("EventSystem").GetComponent <AskPanel>(); }
void _SendPresentYes() { AskPanel confirm = Main.Instance.MakeConfirmPanel(); confirm.Open("선물 보내기", "선물을 정상적으로 보냈습니다."); }