Esempio n. 1
0
    override protected void Awake()
    {
        base.Awake();

        smallPrefab          = ResModel.Instance.GetPrefab("prefab/skillmodule/" + "SkillSmallItem");
        smallList.itemPrefab = smallPrefab;

        groupListPrefab      = ResModel.Instance.GetPrefab("prefab/skillmodule/" + "SkillGroupList");
        groupList.itemPrefab = groupListPrefab;

        ScreenSlider.OpenSlid();

        PosUtil.SetUIPos(starButton, 12);
        PosUtil.SetUIPos(bottleButton, 14);
        PromptModel.Instance.SlideEvent = OnSlideEvent;

        GameObject buggerPrefab = ResModel.Instance.GetPrefab("prefab/base/" + "Bugger");
        GameObject buggerItem   = GameObject.Instantiate(buggerPrefab);

        buggerItem.transform.SetParent(buggerPos, false);
        buggerItem.transform.localPosition = new Vector3(0, 1000, 0);
        buggerItem.transform.localScale    = new Vector3(0.9f, 0.9f, 1);
        bugger        = buggerItem.GetComponent <Bugger>();
        bugger.iconId = 10101;
        bugger.AddPos(new BuggerPosInfo(new Vector2(0, 780), new Vector2(0, 680)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-279, 780), new Vector2(-279, 680)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(279, 780), new Vector2(279, 680)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-558, 468), new Vector2(-458, 468)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-558, 312), new Vector2(-458, 312)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-558, 156), new Vector2(-458, 156)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-558, 0), new Vector2(-458, 0)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(-558, -156), new Vector2(-458, -156)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(558, 468), new Vector2(458, 468)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(558, 312), new Vector2(458, 312)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(558, 156), new Vector2(458, 156)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(558, 0), new Vector2(458, 0)));
        bugger.AddPos(new BuggerPosInfo(new Vector2(558, -156), new Vector2(458, -156)));

        bugger.Show();

        InitList();

        UpdateUI();

        AudioModel.Instance.PlayMusic("rain");
    }