public void FillData()
        {
            var data = new FFBreakoutBatComponent(selectedEntity);

            data.spritename = spriteName;
            engineData.Add(data);
        }
コード例 #2
0
 public Breakout(List <FFEntity> entities)
 {
     _brickList = new List <FFBreakoutBrickComponent>();
     _walls     = new List <FFBreakoutBoundaryComponent>();
     entities.ForEach(entity =>
     {
         if (entity.Components.Any(comp => comp.GetType() == typeof(FFBreakoutManagerComponent)))
         {
             _manager = (FFBreakoutManagerComponent)entity.Components.Find(comp => comp.GetType() == typeof(FFBreakoutManagerComponent));
         }
         else if (entity.Components.Any(comp => comp.GetType() == typeof(FFBreakoutBatComponent)))
         {
             _bat = (FFBreakoutBatComponent)entity.Components.Find(comp => comp.GetType() == typeof(FFBreakoutBatComponent));
         }
         else if (entity.Components.Any(comp => comp.GetType() == typeof(FFBreakoutBallComponent)))
         {
             _ball = (FFBreakoutBallComponent)entity.Components.Find(comp => comp.GetType() == typeof(FFBreakoutBallComponent));
         }
         else if (entity.Components.Any(comp => comp.GetType() == typeof(FFBreakoutBrickComponent)))
         {
             _brickList.Add((FFBreakoutBrickComponent)entity.Components.Find(comp => comp.GetType() == typeof(FFBreakoutBrickComponent)));
         }
         else if (entity.Components.Any(comp => comp.GetType() == typeof(FFBreakoutBoundaryComponent)))
         {
             _walls.Add((FFBreakoutBoundaryComponent)entity.Components.Find(comp => comp.GetType() == typeof(FFBreakoutBoundaryComponent)));
         }
     });
 }