Пример #1
0
        static public void OnGUI(UnitEntityData ch, List <Spellbook> spellbooks)
        {
            var blueprints = BlueprintBrowser.GetBlueprints();

            if (blueprints == null)
            {
                return;
            }
            OnGUI <Spellbook>("Spellbooks", ch, spellbooks,
                              (sb) => sb.Blueprint,
                              BlueprintExensions.GetBlueprints <BlueprintSpellbook>(),
                              (sb) => sb.Blueprint.GetDisplayName(),
                              (sb) => sb.Blueprint.GetDescription(),
                              null,
                              BlueprintAction.ActionsForType(typeof(BlueprintSpellbook))
                              );
        }
Пример #2
0
        static public void OnGUI(UnitEntityData ch, List <Ability> facts)
        {
            var blueprints = BlueprintBrowser.GetBlueprints();

            if (blueprints == null)
            {
                return;
            }
            OnGUI <Ability>("Abilities", ch, facts,
                            (fact) => fact.Blueprint,
                            BlueprintExensions.GetBlueprints <BlueprintAbility>().Where((bp) => !((BlueprintAbility)bp).IsSpell),
                            (fact) => fact.Name,
                            (fact) => fact.Description,
                            (fact) => fact.GetRank(),
                            BlueprintAction.ActionsForType(typeof(BlueprintAbility))
                            );
        }
Пример #3
0
        static public void OnGUI(UnitEntityData ch, List <Buff> facts)
        {
            var blueprints = BlueprintBrowser.GetBlueprints();

            if (blueprints == null)
            {
                return;
            }
            OnGUI <Buff>("Features", ch, facts,
                         (fact) => fact.Blueprint,
                         BlueprintExensions.GetBlueprints <BlueprintBuff>(),
                         (fact) => fact.Name,
                         (fact) => fact.Description,
                         (fact) => fact.GetRank(),
                         BlueprintAction.ActionsForType(typeof(BlueprintBuff))
                         );
        }
Пример #4
0
        static public void OnGUI(UnitEntityData ch, Spellbook spellbook, int level)
        {
            var spells      = spellbook.GetKnownSpells(level).OrderBy(d => d.Name).ToList();
            var spellbookBP = spellbook.Blueprint;
            var learnable   = spellbookBP.SpellList.GetSpells(level);
            var blueprints  = BlueprintBrowser.GetBlueprints();

            if (blueprints == null)
            {
                return;
            }
            OnGUI <AbilityData>($"Spells.{spellbookBP.Name}", ch, spells,
                                (fact) => fact.Blueprint,
                                learnable,
                                (fact) => fact.Name,
                                (fact) => fact.Description,
                                null,
                                BlueprintAction.ActionsForType(typeof(BlueprintAbility))
                                );
        }