Пример #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;
 }