示例#1
0
        private void OnClickPartner()
        {
            ChangePartnerEventArgs eventArgs = new ChangePartnerEventArgs();
            int partner01Id = UnityEngine.Random.Range(90001, 90006);
            int partner02Id = UnityEngine.Random.Range(90001, 90006);

            eventArgs.Fill(partner01Id, partner02Id);
            GameEntry.Event.Fire(this, eventArgs);
        }
示例#2
0
        private void OnChangePartner(object sender, GameEventArgs e)
        {
            ChangePartnerEventArgs ne = e as ChangePartnerEventArgs;

            if (ne == null)
            {
                return;
            }

            m_PlayerData.Partner1Id = ne.Partner01ID == 0 ? m_PlayerData.Partner1Id : ne.Partner01ID;
            m_PlayerData.Partner2Id = ne.Partner02ID == 0 ? m_PlayerData.Partner2Id : ne.Partner02ID;
            LoadPartner();
        }