Пример #1
0
 public CarSection(HostInterface Host, ObjectType Type, bool visibleFromInterior, UnifiedObject Object = null)
 {
     currentHost         = Host;
     Groups              = new ElementsGroup[1];
     Groups[0]           = new ElementsGroup(Type);
     VisibleFromInterior = visibleFromInterior;
     if (Object is StaticObject)
     {
         StaticObject s = (StaticObject)Object;
         Groups[0].Elements    = new AnimatedObject[1];
         Groups[0].Elements[0] = new AnimatedObject(Host)
         {
             States       = new[] { new ObjectState(s) },
             CurrentState = 0
         };
         currentHost.CreateDynamicObject(ref Groups[0].Elements[0].internalObject);
     }
     else if (Object is AnimatedObjectCollection)
     {
         AnimatedObjectCollection a = (AnimatedObjectCollection)Object;
         Groups[0].Elements = new AnimatedObject[a.Objects.Length];
         for (int h = 0; h < a.Objects.Length; h++)
         {
             Groups[0].Elements[h] = a.Objects[h].Clone();
             currentHost.CreateDynamicObject(ref Groups[0].Elements[h].internalObject);
         }
     }
 }
Пример #2
0
 public CarSection(HostInterface Host, ObjectType Type)
 {
     currentHost = Host;
     Groups      = new ElementsGroup[1];
     Groups[0]   = new ElementsGroup(Type);
 }
Пример #3
0
 public CarSection(BaseRenderer Renderer, bool Overlay)
 {
     renderer  = Renderer;
     Groups    = new ElementsGroup[1];
     Groups[0] = new ElementsGroup(Overlay);
 }