Ejemplo n.º 1
0
        public void ChacheOnegai(OnegaiModel onegaiModel)
        {
            var nearArgs = new NearArgs(onegaiModel.OnegaiConditionArg);

            if (!this.monoInfoIdToOngeais.ContainsKey(nearArgs.TargetMonoInfoId))
            {
                this.monoInfoIdToOngeais[nearArgs.TargetMonoInfoId] = new List <OnegaiModel>();
            }
            if (this.monoInfoIdToOngeais[nearArgs.TargetMonoInfoId].Contains(onegaiModel))
            {
                return;
            }
            this.monoInfoIdToOngeais[nearArgs.TargetMonoInfoId].Add(onegaiModel);
        }
Ejemplo n.º 2
0
        public List <PlayerOnegaiModel> Mediate(List <PlayerOnegaiModel> playerOnegaiModels)
        {
            var outputPlayerOnegaiModels = new List <PlayerOnegaiModel> ();

            foreach (var playerOnegaiModel in playerOnegaiModels)
            {
                var nearArgs = new NearArgs(playerOnegaiModel.OnegaiModel.OnegaiConditionArg);
                if (!nearArgs.IsClear(this.targetMonoInfoID, this.nearMonoInfoIDs))
                {
                    continue;
                }

                playerOnegaiModel.ToClear();
                outputPlayerOnegaiModels.Add(playerOnegaiModel);
            }

            return(outputPlayerOnegaiModels);
        }
Ejemplo n.º 3
0
        public void UnChacheOnegai(OnegaiModel onegaiModel)
        {
            var nearArgs = new NearArgs(onegaiModel.OnegaiConditionArg);

            this.monoInfoIdToOngeais[nearArgs.TargetMonoInfoId].RemoveAll(model => model.Id == onegaiModel.Id);
        }