Esempio n. 1
0
    private void Start()
    {
        thesaurusls = BaseManager <IOMgr> .GetInstance();

        jumpToScene = GetComponent <UIPoint>();
        SVC         = GameObject.Find("Scroll View").GetComponentInChildren <ScrollViewContral>();
        LoadThesaurusls(inputWord);
        jumpToScene.jumpSceneName = SceneName.startScene;
        //监听输入框输入
        inputField = GameObject.Find("InputField").GetComponent <InputField>();
        inputField.GetComponent <InputField>().onEndEdit.AddListener(EndEdit);
    }
Esempio n. 2
0
    UIPoint jumpToSence;           //跳转到游戏开始场景
    private void Start()
    {
        IOMgr = BaseManager <IOMgr> .GetInstance();

        WSC         = GameObject.Find("WordsView").GetComponentInChildren <WordScrollContral>();
        USC         = GameObject.Find("UsedView").GetComponentInChildren <UsedScrollContral>();
        tipsText    = GameObject.Find("TipsText").GetComponentInChildren <Text>();
        jumpToSence = GetComponent <UIPoint>();
        LoadThesaurusls(inputWord);
        LoadChooseWord();
        //监听输入框输入
        inputField = GameObject.Find("InputField").GetComponent <InputField>();
        inputField.GetComponent <InputField>().onEndEdit.AddListener(EndEdit);
    }
Esempio n. 3
0
    public void AddPoint(Actor actor)
    {
        if (actor == null)
        {
            return;
        }

        if (m_list.ContainsKey(actor.ID))
        {
            m_list[actor.ID].SetData(actor);
        }
        else
        {
            UIPoint point = UIPoint.Create();
            point.SetData(actor);
            point.SetAnchors(m_map.transform);
            m_list.Add(actor.ID, point);
        }
    }
Esempio n. 4
0
    static public UIPoint Create()
    {
        UIPoint self = UIManager.Singleton.LoadUI <UIPoint>("UI/UIPoint", UIManager.Anchor.Center);

        return(self);
    }
Esempio n. 5
0
        UIPoint[] AreaLayout(List <UpContent> lu, int s)
        {
            int c = lu.Count;

            UIPoint[] up = new UIPoint[c];
            int       t = 0, o = 0;

            for (int i = 0; i < c; i++)
            {
                if (lu[i].type == 'i')
                {
                    if (t == 0)
                    {
                        up[i].layout = 1;
                        t            = 1;
                    }
                    else if (t == 1)
                    {
                        up[i].layout = 2;
                        t            = 2;
                    }
                    else if (t == 2)
                    {
                        if (o == 'i')
                        {
                            up[i].layout     = 3;
                            up[i - 1].layout = 3;
                            up[i - 2].layout = 0;
                            t = 3;
                        }
                        else
                        {
                            up[i].layout = 1;
                            t            = 1;
                        }
                    }
                    else
                    {
                        up[i].layout = 3;
                    }
                    o = 'i';
                }
                else
                {
                    if (i + 1 < c)
                    {
                        if (t == 0)
                        {
                            if (lu[i + 1].type == 'i')
                            {
                                up[i].layout = 1;
                                t            = 1;
                            }
                            else
                            {
                                up[i].layout = 0;
                                t            = 0;
                            }
                        }
                        else
                        if (t == 1)
                        {
                            if (o == 'i')
                            {
                                up[i].layout = 2; t = 2;
                            }
                            else
                            {
                                up[i].layout     = 0;
                                up[i - 1].layout = 0;
                                t = 0;
                            }
                        }
                        else if (t == 2)
                        {
                            if (o == 'i')
                            {
                                up[i].layout = 1;
                                t            = 1;
                            }
                            else
                            {
                                up[i].layout = 0;
                                t            = 0;
                            }
                        }
                        else
                        {
                            up[i].layout = 0;
                            t            = 0;
                        }
                    }
                    else
                    {
                        if (t == 1)
                        {
                            up[i].layout = 2;
                            t            = 2;
                        }
                        else
                        {
                            up[i].layout = 0;
                            t            = 0;
                        }
                    }
                    o = 't';
                }
            }
            return(up);
        }