public bool DeleteLossReason(LossReason lossReason) { if (lossReason == null) { return(false); } _unitOfWork.LossReasonRepository.Delete(lossReason); _unitOfWork.Save(); return(true); }
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."; } }
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); }
public bool EditLossReason(LossReason lossReason) { _unitOfWork.LossReasonRepository.Edit(lossReason); _unitOfWork.Save(); return(true); }
public bool AddLossReason(LossReason lossReason) { _unitOfWork.LossReasonRepository.Add(lossReason); _unitOfWork.Save(); return(true); }
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; }; }