示例#1
0
 internal void HiddenParent()
 {
     if (ObjParentTr != null)
     {
         QyFun.SetActive(ObjParentTr.gameObject, false);
     }
 }
示例#2
0
 /// <summary>
 /// 更新关卡UI显示状态
 /// </summary>
 void UpdateCurrentLevel(int curLevel)
 {
     for (int i = 0; i < m_MapData.m_MapList.Count; i++)
     {
         int val = i + curLevel - 1;
         QyFun.SetActive(m_MapData.m_MapList[i].gameObject, val <= 0 || val > m_MapData.m_MaxLevel ? false : true);
     }
 }
示例#3
0
 protected override void OnInitializationUI()
 {
     buttonGroup = GetComponent <GuiExtendButtonGroup>();
     buttonGroup.selectFuntion += OnButtonSelectOk;
     //先停止工作
     buttonGroup.IsWorkDo = false;
     QyFun.SetActive(lockObject, false);
     CreateGameMap();
     //定位到最后解锁的地图上
     SetCurrentSelectMapIndex(IGamerProfile.Instance.getLastLockedMap);
 }
示例#4
0
    System.Collections.IEnumerator ShowLockObj()
    {
        TweenScale scale = lockObject.AddComponent <TweenScale>();

        scale.from     = Vector3.zero;
        scale.to       = Vector3.one;
        scale.duration = 0.2f;
        scale.PlayForward();
        QyFun.SetActive(lockObject, true);
        yield return(new WaitForSeconds(1f));

        QyFun.SetActive(lockObject, false);
        Destroy(scale);
    }
示例#5
0
    public void SetPosition(int max)
    {
        if (max < 0)
        {
            return;
        }

        if (max > transform.childCount)
        {
            max = transform.childCount;
        }

        int count = 0;

        Transform[] trArray = new Transform[max];
        for (int i = transform.childCount - 1; i >= 0; i--)
        {
            if (count < max)
            {
                trArray[count] = transform.GetChild(i);
            }
            QyFun.SetActive(transform.GetChild(i).gameObject, count < max ? true : false);
            count++;
        }

        List <Transform> listTr = new List <Transform>(trArray);

        listTr.Reverse();
        trArray = listTr.ToArray();

        Vector3 startPos    = Vector3.zero;
        float   indexStartX = -0.5f * (trArray.Length - 1);

        startPos.x = offDisX * indexStartX;
        trArray[0].localPosition = startPos;

        float startX = trArray[0].localPosition.x;

        for (int i = 1; i < trArray.Length; i++)
        {
            Vector3 lp = Vector3.zero;
            lp.x = startX + i * offDisX;
            trArray[i].localPosition = lp;
        }
    }
 void HiddenPanel()
 {
     QyFun.SetActive(gameObject, false);
 }
 public void SetActive(GameObject obj, bool isActive)
 {
     QyFun.SetActive(obj, isActive);
 }
 public void SetActiveBoss(bool isActive)
 {
     QyFun.SetActive(boss, isActive);
 }
 public void SetActiveLocker(bool isActive)
 {
     QyFun.SetActive(locker, isActive);
 }