public override void Start() { base.Start(); PainPoint spearHead = transform.GetChild(0).GetComponent <PainPoint>(); spearHead.attackerTag = attackerTag; spearHead.damageMultiplier = damageMultiplier; }
public async Task <APIResult <bool> > SaveUserSubjective(SubjectiveTest collect, string PointNames) { if (ModelState.IsValid) { var pointid = ""; if (!string.IsNullOrEmpty(collect.Id)) { _isubjectiveTestService.Delete(collect.Id); pointid = collect.Id; _isubjectiveTestService.Save(collect.Id, collect); } else { collect.SysUserId = _iUserInfo.UserId; pointid = Guid.NewGuid().ToString(); collect.Id = pointid; _isubjectiveTestService.Save(null, collect); } await _iUnitOfWork.CommitAsync(); if (!string.IsNullOrEmpty(PointNames) && !string.IsNullOrEmpty(collect.Id)) { PointNames = PointNames.Substring(0, PointNames.Length - 1); string[] sArray = PointNames.Split(','); if (!string.IsNullOrEmpty(collect.Id)) { var painpoints = _ipainPointService.GetAll(a => a.SubjectiveTestId == collect.Id); foreach (var item in painpoints) { _ipainPointService.Delete(item.Id); } } foreach (var item in sArray) { var painPoint = new PainPoint(); _ipainPointService.Save(null, new PainPoint { PointName = (PointName)Enum.Parse(typeof(PointName), item), SubjectiveTestId = pointid }); } await _iUnitOfWork.CommitAsync(); } return(new APIResult <bool>(true)); } return(new APIResult <bool>(false, 100, "操作失败")); }