コード例 #1
0
    private void OnGUI()
    {
        GUI.depth   = (int)guiDepth;
        GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
        GUI.enabled = !DialogManager.Instance.IsModal;
        GUI.Box(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), string.Empty);
        GUI.BeginGroup(new Rect((float)((Screen.width - 760) / 2), (float)((Screen.height - 600) / 2), 760f, 600f));
        crdGuide.x    = (760f - crdGuide.width) / 2f;
        crdNickname.x = (760f - crdNickname.width) / 2f;
        crdOk.x       = (760f - crdOk.width) / 2f;
        string text = string.Format(StringMgr.Instance.Get("GUIDE_PLAYER_INFO"), minNickname, maxNickname);

        GUI.Label(crdGuide, text, "MiddleCenterLabel");
        nickName = GUI.TextField(crdNickname, nickName, maxNickname);
        nickName = nickName.Replace(" ", string.Empty);
        nickName = nickName.Replace("\t", string.Empty);
        nickName = nickName.Replace("\n", string.Empty);
        if (BuildOption.Instance.IsAxeso5)
        {
            nickName = RemoveSpecialCharacters(nickName);
        }
        if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction") && CheckInput() && (areYouSure == null || !areYouSure.Yes))
        {
            areYouSure = (AreYouSure)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.ARE_YOU_SURE, exclusive: true);
            if (areYouSure != null)
            {
                areYouSure.InitDialog(AreYouSure.SURE.CREATE_CHARACTER, nickName);
            }
        }
        GUI.EndGroup();
        GUI.enabled = true;
    }
コード例 #2
0
    public void DeleteInteractingObject()
    {
        if (interactionAndUpgradeOptions.interacting != null)
        {
            //GameObject.Destroy(interactionAndUpgradeOptions.interacting.gameObject);
            CloseInteraction();

            var a = interactionAndUpgradeOptions.interacting.gameObject;
            AreYouSure.RequestConfirm(() => { GameObject.Destroy(a); }, OpenInteraction);
        }
    }
コード例 #3
0
 private void Awake()
 {
     _this = this;
 }
コード例 #4
0
 private void Start()
 {
     areYouSure = null;
 }