public static Type TypeForEnum(this MyActorComponentEnum self) { switch (self) { case MyActorComponentEnum.Renderable: return(typeof(MyRenderableComponent)); case MyActorComponentEnum.Instancing: return(typeof(MyInstancingComponent)); case MyActorComponentEnum.Skinning: return(typeof(MySkinningComponent)); case MyActorComponentEnum.Foliage: return(typeof(MyFoliageComponent)); case MyActorComponentEnum.GroupLeaf: return(typeof(MyGroupLeafComponent)); case MyActorComponentEnum.GroupRoot: return(typeof(MyGroupRootComponent)); case MyActorComponentEnum.InstanceLod: return(typeof(MyInstanceLodComponent)); } return(null); }
internal MyActorComponent GetComponent(MyActorComponentEnum type) { for (int i = 0; i < m_components.Count; i++) { if (m_components[i].Type == type) { return(m_components[i]); } } return(null); }
internal MyActorComponent GetComponent(MyActorComponentEnum type) { for (int i = 0; i < m_components.Count; i++ ) { if (m_components[i].Type == type) return m_components[i]; } return null; }
internal virtual void Construct() { m_owner = null; Type = MyActorComponentEnum.Unassigned; }