Exemplo n.º 1
0
 // 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>();
 }
Exemplo n.º 2
0
    public void OnClickDelete()
    {
        AskPanel askPanel = Main.Instance.MakeAskPanel();

        askPanel.Open("친구 삭제", "정말 친구를 삭제하시겠습니까?", OnClickFriendDeleteYes, null, raw_friend_id);
        askPanel.SetEventTarget(gameObject);
    }
Exemplo n.º 3
0
    // 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();
    }
Exemplo n.º 4
0
    /*
     * 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("선물 보내기", "선택된 친구가 없습니다.");
        }
    }
Exemplo n.º 5
0
    public AskPanel MakeConfirmPanel()
    {
        AskPanel askPanel = MakeObjectToTarget("UI/Confirm_Panel").GetComponent <AskPanel>();

        askPanel.gameObject.SetActive(true);

        return(askPanel);
    }
Exemplo n.º 6
0
 // Start is called before the first frame update
 void Start()
 {
     editAsk = GameObject.Find("EventSystem").GetComponent <AskPanel>();
 }
Exemplo n.º 7
0
    void _SendPresentYes()
    {
        AskPanel confirm = Main.Instance.MakeConfirmPanel();

        confirm.Open("선물 보내기", "선물을 정상적으로 보냈습니다.");
    }