コード例 #1
0
        public void Update()
        {
            UpdateAddDisposer();
            UpdateRemoveDisposer();

            HashSet <Disposer> list;

            if (!this.disposers.TryGetValue(EntityEventType.Update, out list))
            {
                return;
            }
            foreach (Disposer disposer in list)
            {
                try
                {
                    if (this.removeDisposers.Contains(disposer))
                    {
                        continue;
                    }
                    EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()];
                    entityTypeInfo.Get(EntityEventType.Update).Run(disposer);
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }
        }
コード例 #2
0
        private void Load()
        {
            HashSet <Disposer> list;

            if (!this.disposers.TryGetValue(EntityEventType.Load, out list))
            {
                return;
            }
            foreach (Disposer disposer in list)
            {
                EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()];
                entityTypeInfo.Get(EntityEventType.Load).Run(disposer);
            }
        }
コード例 #3
0
        public void LateUpdate()
        {
            HashSet <Disposer> list;

            if (!this.disposers.TryGetValue(EntityEventType.LateUpdate, out list))
            {
                return;
            }
            foreach (Disposer disposer in list)
            {
                try
                {
                    EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()];
                    entityTypeInfo.Get(EntityEventType.LateUpdate).Run(disposer);
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }
        }
コード例 #4
0
        public void Awake(Disposer disposer, object p1, object p2, object p3)
        {
            EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()];

            entityTypeInfo.Get(EntityEventType.Awake3)?.Run(disposer, p1, p2, p3);
        }
コード例 #5
0
        public void Awake(Disposer disposer)
        {
            EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()];

            entityTypeInfo.Get(EntityEventType.Awake)?.Run(disposer);
        }