Пример #1
0
        public override void Initialize()
        {
            base.Initialize();

            if (ModelPath != null)
            {
                RootComponent = new Drawable3DComponent(ModelPath);
                Parent.AddComponent(RootComponent);
            }
        }
Пример #2
0
        public override void Initialize()
        {
            base.Initialize();

            if (ModelPath != null)
            {
                RootComponent = new Drawable3DComponent(ModelPath)
                {
                    TexturePath = "player/idle/player_idle_01"
                };
                Parent.AddComponent(RootComponent);
            }
        }
Пример #3
0
 public override void Update(GameTime gameTime)
 {
     if (!_createdBoxes)
     {
         _createdBoxes = true;
         var   component = new Drawable3DComponent(RootComponent.ModelData);
         var   model     = component.ModelData;
         float scale     = 20f;
         for (int i = 0; i < 50; ++i)
         {
             for (int j = 0; j < 20; ++j)
             {
                 Parent.AddComponent(
                     new Drawable3DComponent(model)
                 {
                     Position = new Vector3(50f * i, 50f * j, 0f)
                 }
                     );
             }
         }
         Parent.Scale = new Vector3(scale, scale, scale);
     }
 }