Exemple #1
0
        protected override void PostConstruct()
        {
            base.PostConstruct();

            Morphs
            .Bind(m => CreateMorphPanel(m))
            .Iter(p => MorphsPanel.AddChild(p));
        }
 protected override Validation <string, MorphGroupPanel> CreateService(
     Godot.Control node, ILoggerFactory loggerFactory)
 {
     return
         (from morphGroup in Group
          .ToValidation("Failed to find the morph group.")
          from morphsPanel in MorphsPanel
          .ToValidation("Failed to find the morph list panel.")
          from colorMorphScene in Optional(ColorMorphPanelScene)
          .ToValidation("Missing color morph panel scene.")
          from rangedMorphScene in Optional(RangedMorphPanelScene)
          .ToValidation("Missing ranged morph panel scene.")
          select new MorphGroupPanel(
              morphGroup,
              Morphs.Bind(m => m.GetMorphs(morphGroup)).Filter(m => !m.Definition.Hidden),
              morphsPanel,
              colorMorphScene,
              rangedMorphScene,
              node,
              loggerFactory));
 }