Exemple #1
0
        public Component AddComponent(Component comp)
        {
            comp.Entity = this;

            if (_loaded)
            {
                comp.Load();          // Loading component if entity already loaded.
            }
            Debug.Log($"Adding component : {comp} on entity : {ToString()}");
            Components.Add(comp);
            return(comp);
        }