Esempio n. 1
0
        public Component3D AddComponent(Component3D component)
        {
            if (component != null)
            {
                Components.Add(component);
                component.LinkedObject = this;
            }

            return(component);
        }
Esempio n. 2
0
        public void RemoveComponent <T>()
        {
            Component3D Com = Components.Find(x => x is T);

            if (Com != null)
            {
                Components.Remove(Com);
            }
            else
            {
                Debug.LogError("3DObject \"" + ObjectName + "\" does not already contain the component \"" + typeof(T).Name + "\"");
            }
        }
Esempio n. 3
0
        public bool HasComponent <T>()
        {
            Component3D com = Components.Find(x => x is T);

            return(com != null ? true : false);
        }