示例#1
0
        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);
        }
示例#2
0
 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);
 }
示例#3
0
 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;
 }
示例#4
0
 internal virtual void Construct()
 {
     m_owner = null;
     Type    = MyActorComponentEnum.Unassigned;
 }