Exemplo n.º 1
0
        public void PersistDice(DiceEntity dice)
        {
            int lastKey = _db.DiceEntity.Max(p => p.PrimaryId);

            dice.PrimaryId = ++lastKey;
            _db.DiceEntity.Add(dice);
            _db.SaveChanges();
        }
Exemplo n.º 2
0
 public void Execute()
 {
     RoomMaJiangProxy.Instance.SetLuckPoker(m_Poker.index, m_Poker.color, m_Poker.size);
     if (MaJiangSceneCtrl.Instance != null)
     {
         DiceEntity dice = null;
         if (RoomMaJiangProxy.Instance.CurrentRoom.ObsoleteDice.Count > 0)
         {
             dice = RoomMaJiangProxy.Instance.CurrentRoom.ObsoleteDice.Dequeue();
         }
         MaJiangSceneCtrl.Instance.PlayLuckPokerAnimation(true, dice);
     }
 }