public ArticleTarget(TargetHead codeHead, TargetPart codePart, ConfigCode codeBody, TargetSeed seedBody) { this.InternalHead = codeHead; this.InternalPart = codePart; this.InternalCode = codeBody; this.InternalSeed = seedBody; }
public void Init() { if (_joystick == null) { _joystick = new Joystick(); } if (_touchScene == null) { _touchScene = new TouchScene(); } if (_functionHall == null) { _functionHall = new FunctionHall(); } if (_targetHead == null) { _targetHead = new TargetHead(); _targetHead.SetActive(false); } if (_skillAtkDlg == null) { _skillAtkDlg = new SkillAtkDlg(); } }
public TargetItem AddMainPart(TargetHead codeHead, ISourceValues tagsBody) { TargetPart PART_CODE = ArticleTarget.PART_CODE_NULL; ConfigCode BODY_CODE = GetPartConfigCode(); return(AddGeneralItem(codeHead, PART_CODE, BODY_CODE, ArticleTarget.BODY_SEED_NULL, tagsBody)); }
public TargetItem AddMainHead(ISourceValues tagsBody) { TargetHead HEAD_CODE = ArticleTarget.HEAD_CODE_NULL; TargetPart PART_CODE = ArticleTarget.PART_CODE_NULL; ConfigCode BODY_CODE = GetHeadConfigCode(); return(AddGeneralItem(HEAD_CODE, PART_CODE, BODY_CODE, ArticleTarget.BODY_SEED_NULL, tagsBody)); }
private IEnumerable <TargetItem> CreateTargetsQueue(ConfigCode code, TargetItem target, IEnumerable <TargetHead> heads, IEnumerable <Tuple <TargetHead, TargetPart> > parts) { IEnumerable <ArticleTarget> targetList = new List <ArticleTarget>(); ConfigType targetType = ModelSourceProfile.GetConfigType(code); ConfigBind targetBind = ModelSourceProfile.GetConfigBind(code); TargetHead codeHead = 0; TargetPart codePart = 0; ConfigCode codeBody = code; TargetSeed seedBody = 0; if (targetBind == (ConfigBind)ArticleBind.ARTICLE_OPT) { return(targetList); } if (targetType == (ConfigType)ArticleType.NO_HEAD_PART_TYPE) { targetList = new List <ArticleTarget>() { new ArticleTarget(codeHead, codePart, codeBody, seedBody) }; } if (targetType == (ConfigType)ArticleType.HEAD_CODE_ARTICLE) { if (target.Head() != 0) { codeHead = target.Head(); targetList = new List <ArticleTarget>() { new ArticleTarget(codeHead, codePart, codeBody, seedBody) }; } else { targetList = heads.Select((ch) => (new ArticleTarget(ch, codePart, codeBody, seedBody))).ToList(); } } else if (targetType == (ConfigType)ArticleType.PART_CODE_ARTICLE) { if (target.Head() != 0 && target.Part() != 0) { codeHead = target.Head(); codePart = target.Part(); targetList = new List <ArticleTarget>() { new ArticleTarget(codeHead, codePart, codeBody, seedBody) }; } else { targetList = parts.Select((pp) => (new ArticleTarget(pp.Item1, pp.Item2, codeBody, seedBody))).ToList(); } } return(targetList); }
private void Start() { _player = FindObjectOfType <Player>(); _fireArm = Instantiate(_fireArms[Random.Range(0, _fireArms.Count)], _holder); _targetHead = Instantiate(_targetHeads[Random.Range(0, _targetHeads.Count)], _holder); _movementLeg = Instantiate(_movementLegs[Random.Range(0, _movementLegs.Count)], _holder); Instantiate(_ammoArms[Random.Range(0, _ammoArms.Count)], _holder); Instantiate(_statTorsos[Random.Range(0, _statTorsos.Count)], _holder); Instantiate(_statBoots[Random.Range(0, _statBoots.Count)], _holder); }
public TargetItem StoreGeneralItem(TargetHead codeHead, TargetPart codePart, ConfigCode codeBody, TargetSeed seedBody, ISourceValues tagsBody) { ArticleTarget newTarget = new ArticleTarget(codeHead, codePart, codeBody, seedBody); SourcePack newSource = GetTemplateSourceForArticle(codeBody, tagsBody); model.Add(newTarget, newSource); return(newTarget); }
private Result <IEnumerable <AbsenceEvaluateSource>, string> GetAbsenceValues() { ConfigCode filterCode = (ConfigCode)ArticleCodeCz.FACT_CONTRACT_ATTEND_ITEM; TargetHead filterHead = InternalTarget.Head(); Result <IEnumerable <AbsenceEvaluateSource>, string> absenceList = InternalValues .GetResultValuesInListAndError <ArticleGeneralResult, MonthAttendanceValue, AbsenceEvaluateSource>( TargetFilters.TargetCodePlusHeadFunc(filterCode, filterHead), ArticleFilters.SelectAllFunc, ResultFilters.MonthAttendanceFunc, BuildItem); return(absenceList); }
public static Func <TargetItem, bool> TargetCodePlusHeadFunc(TargetCode targetCode, TargetHead targetHead) { return((x) => (x.IsEqualByCodePlusHead(targetCode, targetHead))); }
public static Func <TargetItem, bool> TargetHeadFunc(TargetHead targetHead) { return((x) => (x.IsEqualByHead(targetHead))); }
public TargetItem AddGeneralItem(TargetHead codeHead, TargetPart codePart, ConfigCode codeBody, TargetSeed seedBody, ISourceValues tagsBody) { TargetSeed newTargetSeed = TargetSelector.GetSeedToNewTarget(model.Keys, codeHead, codePart, codeBody); return(StoreGeneralItem(codeHead, codePart, codeBody, newTargetSeed, tagsBody)); }
public bool IsEqualByHead(TargetHead otherHead) { return(this.InternalHead == otherHead); }
static private IEnumerable <IArticleTarget> SelectEquals(IEnumerable <IArticleTarget> targetList, TargetHead codeHead, TargetPart codePart, ConfigCode codeBody) { return(targetList.Where(x => (EqualitySelector(x, codeHead, codePart, codeBody))).ToList()); }
public static Func <TargetItem, bool> TargetCodePlusHeadAndNullPartFunc(TargetCode targetCode, TargetHead targetHead) { TargetPart targetPart = ArticleTarget.PART_CODE_NULL; return((x) => (x.IsEqualByCodePlusHeadAndPart(targetCode, targetHead, targetPart))); }
public bool IsEqualByHeadAndPart(TargetHead otherHead, TargetPart otherPart) { return(this.InternalHead == otherHead && this.InternalPart == otherPart); }
public bool IsEqualByCodePlusHeadAndPart(ConfigCode otherCode, TargetHead otherHead, TargetPart otherPart) { return(this.InternalCode == otherCode && this.InternalHead == otherHead && this.InternalPart == otherPart); }
public bool IsEqualByCodePlusHeadAndSeed(ConfigCode otherCode, TargetHead otherHead, TargetPart otherSeed) { return(this.InternalCode == otherCode && this.InternalHead == otherHead && this.InternalSeed == otherSeed); }
public bool IsEqualByCodePlusHead(ConfigCode otherCode, TargetHead otherHead) { return(this.InternalCode == otherCode && this.InternalHead == otherHead); }
public static Func <TargetItem, bool> TargetCodePlusPartFunc(TargetCode targetCode, TargetHead targetHead, TargetPart targetPart) { return((x) => (x.IsEqualByCodePlusHeadAndPart(targetCode, targetHead, targetPart))); }
public TargetItem AddHeadItem(TargetHead codeHead, ConfigCode codeBody, ISourceValues tagsBody) { TargetPart PART_CODE = ArticleTarget.PART_CODE_NULL; return(AddGeneralItem(codeHead, PART_CODE, codeBody, ArticleTarget.BODY_SEED_NULL, tagsBody)); }
static public TargetSeed GetSeedToNewTarget(IEnumerable <IArticleTarget> targetList, TargetHead codeHead, TargetPart codePart, ConfigCode codeBody) { IEnumerable <IArticleTarget> selectedTargets = SelectEquals(targetList, codeHead, codePart, codeBody); IEnumerable <TargetSeed> oneCodeSeeds = ExtractCodeSeed(selectedTargets); return(NewSeqSeedFromList(oneCodeSeeds.OrderBy(x => x).ToArray())); }
public TargetItem AddPartItem(TargetHead codeHead, TargetPart codePart, ConfigCode codeBody, ISourceValues tagsBody) { return(AddGeneralItem(codeHead, codePart, codeBody, ArticleTarget.BODY_SEED_NULL, tagsBody)); }
public static bool EqualitySelector(IArticleTarget target, TargetHead codeHead, TargetPart codePart, ConfigCode codeBody) { return(target.Head() == codeHead && target.Part() == codePart && target.Code() == codeBody); }
public static Result <IEnumerable <PositionScheduleEvalDetail>, string> GetPositionValues(IEnumerable <ResultPair> results, ConfigCode termCode, ConfigCode dataCode, TargetHead headCode) { Result <IEnumerable <ResultPair>, string> termList = results .GetTypedResultsInListAndError <ArticleGeneralResult>( TargetFilters.TargetCodePlusHeadFunc(termCode, headCode)); Result <IEnumerable <ResultPair>, string> dataList = results .GetTypedResultsInListAndError <ArticleGeneralResult>( TargetFilters.TargetCodePlusHeadFunc(dataCode, headCode)); if (ResultMonadUtils.HaveAnyResultFailed(termList, dataList)) { return(Result.Fail <IEnumerable <PositionScheduleEvalDetail>, string>( ResultMonadUtils.FirstFailedResultError(termList, dataList))); } var zipsList = GetZip2Position(termList.Value, dataList.Value); if (zipsList.IsFailure) { return(Result.Fail <IEnumerable <PositionScheduleEvalDetail>, string>(zipsList.Error)); } var valsList = zipsList.Value.Select((tp) => (BuildItem(tp.Key, tp.Value.Item1, tp.Value.Item2))).ToList(); return(valsList.ToResultWithValueListAndError((tp) => (tp))); }