예제 #1
0
파일: Field.cs 프로젝트: jiowchern/Regulus
        internal void Update(IObserveAbility observe, Regulus.Project.TurnBasedRPG.Map.EntityInfomation[] entitys, List<IObservedAbility> lefts)
        {
            foreach (var exit in lefts)
            {
                _Remove(_Within, exit.Id);
                if (LeftEvent != null)
                    LeftEvent(exit);

            }

            foreach(var e in entitys.Except(_Within))
            {
                if (e.Observed != null)
                {
                    if (IntoEvent != null)
                        IntoEvent(e.Observed);
                }

            }
            foreach (var e in _Within.Except(entitys))
            {
                if (e.Observed != null)
                {
                    if (LeftEvent != null)
                        LeftEvent(e.Observed);
                }

            }
            _Within = entitys.ToList();
        }