/*--------------------------------------
         * PUBLIC METHODS
         *------------------------------------*/

        /// <summary>Adds a component to the entity.</summary>
        /// <param name="component">The component to add to the entity.</param>
        public void AddComponent(EcsComponent component)
        {
            mComponents.Add(component.GetType(), component);

            var scene = mScene;

            if (scene != null)
            {
                scene.NotifyComponentsChanged(this);
            }
        }
Exemplo n.º 2
0
 public void AddComponent(EcsComponent component)
 {
     mComponents.Add(component.GetType(), component);
 }