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

            return(component);
        }
예제 #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 + "\"");
            }
        }
예제 #3
0
        public bool HasComponent <T>()
        {
            Component3D com = Components.Find(x => x is T);

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