Exemple #1
0
    public void SetSystemNotDic(string title, NoticeIdentify identify, NoticeState state, int sort, string content)
    {
        SystemNoticeType notice = new SystemNoticeType();

        notice.SetSystemNotice(title, identify, state, sort, content);

        List <KeyValuePair <int, SystemNoticeType> > myList = new List <KeyValuePair <int, SystemNoticeType> >(systemNotDic);

        myList.Sort(delegate(KeyValuePair <int, SystemNoticeType> s1, KeyValuePair <int, SystemNoticeType> s2)
        {
            return(s1.Value.mNoticeSort.CompareTo(s2.Value.mNoticeSort));
        });

        systemNotDic.Clear();

        foreach (KeyValuePair <int, SystemNoticeType> pair in myList)
        {
            systemNotDic.Add(pair.Key, pair.Value);
        }

        //foreach(string key in dic.Keys)
        // {
        //     Response.Write(dic[key] +"<br />");
        // }
        //foreach(var item in systemNotDic.OrderByDescending)
    }
Exemple #2
0
    public void SetSystemNotList(string title, NoticeIdentify identify, NoticeState state, int sort, string content)
    {
        SystemNoticeType notice = new SystemNoticeType();

        notice.SetSystemNotice(title, identify, state, sort, content);
        SystemNoticeType temp = null;

        foreach (var item in systemNotList)
        {
            if (item.mNoticeSort == sort)
            {
                item.SetNoticChildSort(item.mNoticChildSort);
            }
        }
        for (int i = 0; i < systemNotList.Count; i++)
        {
            if (systemNotList[i].mNoticeSort <= notice.mNoticeSort &&
                systemNotList[i].mNoticChildSort > notice.mNoticChildSort)//当新公告优先级高于
            {
                temp             = systemNotList[i];
                systemNotList[i] = notice;
                notice           = temp;
            }
        }
        systemNotList.Add(notice);
    }
Exemple #3
0
 //this happen when notice screen is showing, allowing player to close it
 void onNotice()
 {
     if (rewiredPlayer1.GetButtonDown("Confirm") || rewiredPlayer2.GetButtonDown("Confirm"))
     {
         noticeScreen.GetComponent <Animator>().SetBool("isExit", true);
         currentNoticeState = NoticeState.OffNotice;
     }
 }
Exemple #4
0
 public void SetSystemNotice(string title, NoticeIdentify identify, NoticeState state, int sort, string content)
 {
     mNoticChildSort = 0;
     mNoticeTitle    = title;
     mNoticeIdentify = identify;
     mNoticeState    = state;
     mNoticeSort     = sort;
     mNoticeContent  = content;
 }
Exemple #5
0
    // Start is called before the first frame update
    void Start()
    {
        //set controller
        rewiredPlayer1 = ReInput.players.GetPlayer(0);
        rewiredPlayer2 = ReInput.players.GetPlayer(1);

        //check if there is any ganeral notice for the game at the moment
        if (generalNotice)
        {
            currentNoticeState = NoticeState.OpeningNotice;
        }
        else
        {
            currentNoticeState = NoticeState.OffNotice;
        }

        //set component
        modeSelecter_Circle = GameObject.Find("ModeSelector").GetComponent <ModeSelector_CenterRotation>();
        menuWindow          = GameObject.Find("MenuWindow").GetComponent <MenuWindow>();
        modeSelector_screen = GameObject.Find("Screens").GetComponent <ModeSelector_ScreenChange>();
        bubbleChange        = false;
    }
Exemple #6
0
 //this happen when notice screen is called
 void callNotice()
 {
     noticeScreen       = Instantiate(Resources.Load("Prefabs/PalmmyEffect/NoticeScreen"), transform) as GameObject;
     currentNoticeState = NoticeState.OnNotice;
 }