Exemple #1
0
        public void RemoveComponet(YuoEntity entity, YuoComponent componet)
        {
            components[componet.Type].Remove(componet);
            foreach (var system in systemsOfComponent[componet.Type])
            {
                if (system is IDestroy)
                {
                    system.RunType = SystemType.Destroy;
                    system.m_Run(entity);
                }

                system.RemoveComponent(entity);
            }

            componet.Dispose();
        }