Beispiel #1
0
    void WaitFind(string _key, int _step, string _fullName, float curWidth, float curHeight, Vector3 arrowPositon, Vector3 arrowRotate, int zoomType, bool IsSaveToServer, bool isScroll, CreateJianTouDelEvent _CreateJianTouDelEvent, float correctionScale, Vector3 correction, bool IsCloseGuide)
    {
        Transform targetTran = null;

        targetTran = mRootTran.Find(_fullName);
        if (targetTran != null)
        {
            for (int i = 0; i < mJianTouNameList.Count; i++)
            {
                if (mJianTouNameList[i].JianTouName == (_fullName + _key + _step))
                {
                    mJianTouNameList.RemoveAt(i);
                }
            }

            if (isScroll)
            {
                UIDragScrollView scroll = targetTran.GetComponent <UIDragScrollView>();
                if (scroll != null)
                {
                    scroll.enabled = false;
                }
            }

            getGUIBeginnerGuide().ShowArrowBootMode(correction, correctionScale, curWidth, curHeight, arrowPositon, arrowRotate, zoomType);

            JianTouObject tJianTouObject = new JianTouObject();
            tJianTouObject.JianTouName = _fullName + _key + _step;
            tJianTouObject.Key         = _key;
            tJianTouObject.Value       = _step;

            tJianTouObject.IsCloseGuide   = IsCloseGuide;
            tJianTouObject.IsSaveToServer = IsSaveToServer;
            mJianTouNameList.Add(tJianTouObject);

            NGUITools.SetActive(mTalkTargetObj, false);

            if (_CreateJianTouDelEvent != null)
            {
                _CreateJianTouDelEvent(tJianTouObject);
            }
        }
    }
Beispiel #2
0
    // 处理按钮点击//
    public void NewTriggerSave(string _fullName, int type, float val = 0.0f)
    {
        string        key               = "";
        int           curStep           = 0;
        int           nextStep          = 0;
        JianTouObject tCurJianTouObject = null;

        for (int i = 0; i < mJianTouNameList.Count; i++)
        {
            JianTouObject tJianTouObject = mJianTouNameList[i];

            if (tJianTouObject.JianTouName == _fullName + tJianTouObject.Key + tJianTouObject.Value)
            {
                tCurJianTouObject = tJianTouObject;

                if (getGUIBeginnerGuide() != null && !tJianTouObject.IsCloseGuide)
                {
                    getGUIBeginnerGuide().HideArrowBootMode();
                }
                else
                {
                    GUIBeginnersGuide.Hide();
                }

                key     = tJianTouObject.Key;
                curStep = tJianTouObject.Value;
                if (curStep == TeachFinishedValue)
                {
                    curStep  = TeachFinishedValue - 1;
                    nextStep = TeachFinishedValue;
                    if (getGUIBeginnerGuide() != null)
                    {
                        if (tJianTouObject.IsCloseGuide)
                        {
                            getGUIBeginnerGuide().HideArrowBootMode();
                        }
                        else
                        {
                            GUIBeginnersGuide.Hide();
                        }
                    }
                }
                else if (curStep == TeachXunHuanValue)
                {
                    NewWriteSaveData(key, 0);
                    mJianTouNameList.RemoveAt(i);
                    return;
                }
                else
                {
                    nextStep = curStep + 1;
                }

                mJianTouNameList.RemoveAt(i);

                break;
            }
        }

        if (nextStep == 0 || curStep == 0)
        {
            return;
        }

        if (nextStep > curStep)
        {
            NewWriteSaveData(key, nextStep, tCurJianTouObject.IsSaveToServer);
            NewRefreshAllTeach();
        }
    }