コード例 #1
0
ファイル: LossReasonService.cs プロジェクト: nathnael/cats
 public bool DeleteLossReason(LossReason lossReason)
 {
     if (lossReason == null)
     {
         return(false);
     }
     _unitOfWork.LossReasonRepository.Delete(lossReason);
     _unitOfWork.Save();
     return(true);
 }
コード例 #2
0
 public void PrintLossReason(LossReason lossReason)
 {
     reasonText = GameObject.FindGameObjectWithTag("LossReasonText").GetComponent <Text>();
     if (lossReason == LossReason.INSUFFICIENTVALUE)
     {
         reasonText.text = "The card you selected did not have enough value.";
     }
     else if (lossReason == LossReason.FOUL)
     {
         reasonText.text = "A special card cannot be selected if it is the last card in your hand.";
     }
     else if (lossReason == LossReason.NOCARDS)
     {
         reasonText.text = "You have no more cards in your hand.";
     }
 }
コード例 #3
0
        private LossReason BindLossReason(LossReasonModel model)
        {
            if (model == null)
            {
                return(null);
            }
            var lossReason = new LossReason()
            {
                LossReasonId     = model.LossReasonId,
                LossReasonAm     = model.LossReasonAm,
                LossReasonEg     = model.LossReasonEg,
                LossReasonCodeAm = model.LossReasonCodeAm,
                LossReasonCodeEg = model.LossReasonCodeEg,
                Description      = model.Description
            };

            return(lossReason);
        }
コード例 #4
0
ファイル: LossReasonService.cs プロジェクト: nathnael/cats
 public bool EditLossReason(LossReason lossReason)
 {
     _unitOfWork.LossReasonRepository.Edit(lossReason);
     _unitOfWork.Save();
     return(true);
 }
コード例 #5
0
ファイル: LossReasonService.cs プロジェクト: nathnael/cats
 public bool AddLossReason(LossReason lossReason)
 {
     _unitOfWork.LossReasonRepository.Add(lossReason);
     _unitOfWork.Save();
     return(true);
 }
コード例 #6
0
ファイル: XonixCore.cs プロジェクト: RavingRabbit/Labs
 public void RestartGame(LossReason lossReason)
 {
     if (_changingLevel)
         return;
     switch (lossReason)
     {
         case LossReason.LastLifeSpent:
             _statisticsPanel.LastLifeSpent = true;
             break;
         case LossReason.TimeSpent:
             _statisticsPanel.TimeSpent = true;
             break;
     }
     _changingLevel = true;
     _statisticsPanel.TryAgain = true;
     var zoomingEffect = new ZoomingEffect(this, 1f, 3f, 1.7f);
     GameObjectCollection.Add(zoomingEffect);
     zoomingEffect.Disposed += (sender, args) =>
         {
             Lifes = 3;
             StartLevel(1);
             _changingLevel = false;
         };
 }