Пример #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Entities.Feedable  feedable           = new Entities.Feedable();
            BuildingBlockGroup buildingBlockGroup = new BuildingBlockGroup(buildingBlockHostService);
            BuildingBlock      buildingBlock      = new BuildingBlock(buildingBlockGroup, BBShapes.poop, BBShapes.poop, feedable);

            buildingBlock.Show();
        }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            buildingBlockHostService = new BuildingBlockHostService(BlockHolder);
            BuildingBlockGroup buildingBlockGroup = new BuildingBlockGroup(buildingBlockHostService);
            BuildingBlock      buildingBlock      = new BuildingBlock(buildingBlockGroup, BBShapes.poop, BBShapes.poop);

            buildingBlockGroup.DemoAllBlocks();
        }
Пример #3
0
 public BuildingBlock(BuildingBlockGroup buildingBlocks, BBShapes Head, BBShapes tail)
 {
     Position = buildingBlocks.Position;
     //TODO 改
     size        = pv.building_block_size;
     Father_Node = (buildingBlocks.buildingBlocks.Count >= 1 ? buildingBlocks.buildingBlocks[buildingBlocks.buildingBlocks.Count - 1] : null);
     Child_Node  = null;
     depth       = buildingBlocks.buildingBlocks.Count;
     if (depth == 1)
     {
         IsHead = true;
     }
     else
     {
         IsHead = false;
     }
     BuildingBlockGroup = buildingBlocks;
     HeadShape          = Head;
     TailShape          = tail;
     g = buildingBlocks.Holder;
     buildingBlocks.buildingBlocks.Add(this);
 }
Пример #4
0
 public void RemoveGroup(BuildingBlockGroup b) => BBGroups.Remove(b);