public ActionResult Edit(int id) { IImpact _impact = _service.GetImpactById(id); var _impactModel = Mapper.Map <IImpact, ImpactModel>(_impact); return(View(_impactModel)); }
public void Activation(ExplorerImpactType type, int impactId, ExplorerPositionData position) { if (type != ExplorerImpactType.StageInit) { _explorer.State.Position = position; } IImpact impact = null; switch (type) { case ExplorerImpactType.StageInit: impact = _explorer.GetStageImpact(impactId, true); break; case ExplorerImpactType.StageFinish: //impact = _explorer.GetStageImpact(impactId, false); break; case ExplorerImpactType.RoomsInit: impact = _explorer.GetRoomImpact(impactId); break; case ExplorerImpactType.PlayerLevels: impact = Player.GetImpact(impactId); break; default: throw new Exception($"Unknown activationType = {type}"); } if (impact != null) { _impactLogic.ExecuteImpact(impact); } }
void ExecuteAbility(int ownerId, int?target, IImpact impact, int abilityId, bool isEnemy) { _contextLogic.SetAbilityContext(ownerId, target, isEnemy); _contextLogic.CurrentAbility = abilityId; _impactLogic.ExecuteImpact(impact); _contextLogic.CurrentAbility = 0; UpdateDrop(); _battleLogic.UpdateAbility(ownerId, abilityId); }
public ActionResult Delete(int id) { IImpact _impact = _service.GetImpactById(id); var _impactModel = Mapper.Map <IImpact, ImpactModel>(_impact); if (_impactModel != null) { return(PartialView(_impactModel)); } return(HttpNotFound()); }
public ActionResult Edit(int id, FormCollection collection) { try { IImpact _impact = _service.GetImpactById(id); TryUpdateModel(_impact, collection); _service.UpdateImpact(_impact); return(RedirectToAction("Index")); } catch { return(View()); } }
public DamageEffect(uint value) { impact = new DamageImpact((int)value); }
public ImpactsController(IImpact repository, IMapper mapper) { _repository = repository; _mapper = mapper; }
public ImpactEffect(IImpact impact) { Impact = impact; }
public Boolean ExecuteImpact(IImpact impact, Boolean checkCondition) { return(ImpactLogic.ExecuteImpact(impact, checkCondition)); }
public bool ExecuteImpact(IImpact impact, bool checkCondition = true) { return(_impactController.ExecuteImpact(impact, checkCondition)); }
public void UpdateImpact(IImpact impact) { _unitOfWork.Impact.Update(impact); _unitOfWork.Save(); }
public void CreateImpact(IImpact impact) { _unitOfWork.Impact.Create(impact); _unitOfWork.Save(); }
public TransferAction(IImpact impact) { Renderer = new TextureRenderer("guiactions", new (2, 0)); Name = new TextPointer("actions", "Transfer"); Impact = impact; }