Exemplo n.º 1
0
    public override void OnSRPGCKInspectorGUI()
    {
        e.equipmentName = EditorGUILayout.TextField("Name", e.equipmentName).NormalizeName();
        float halfWidth = Screen.width / 2;

        EditorGUILayout.BeginHorizontal(GUILayout.Width(Screen.width - 32));
        e.equipmentSlots      = EditorGUIExt.ArrayFoldout("Slots", e.equipmentSlots, ref showSlots, false, halfWidth - 16, "body");
        e.equipmentCategories = EditorGUIExt.ArrayFoldout("Categories", e.equipmentCategories, ref showCategories, false, halfWidth - 16, "armor");
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Space();

        e.parameters = EditorGUIExt.ParameterFoldout("Parameter", e.parameters, "" + e.GetInstanceID(), formulaOptions, lastFocusedControl, ref showParameters);

        EditorGUILayout.Space();

        e.passiveEffects = EditorGUIExt.StatEffectFoldout("Passive Effect", e.passiveEffects, StatEffectContext.Normal, "" + e.GetInstanceID(), formulaOptions, lastFocusedControl, ref showPassiveEffects);

        EditorGUILayout.Space();

        e.statusEffectPrefabs = EditorGUIExt.ObjectArrayFoldout <StatusEffect>("Status Effect Prefabs", e.statusEffectPrefabs, ref showStatusEffects);
    }
Exemplo n.º 2
0
    public override void OnSRPGCKInspectorGUI()
    {
        c.characterName = EditorGUILayout.TextField("Name", c.characterName).
                          NormalizeName();
        c.EditorSetBaseStat(
            "team",
            EditorGUIExt.FormulaField(
                "Team #",
                c.EditorGetBaseStat("team") ?? Formula.Constant(0),
                "character.team.param",
                formulaOptions,
                lastFocusedControl,
                0
                )
            );
        EditorGUILayout.Space();

        c.size = EditorGUILayout.Vector3Field("Size (Tiles):", c.size);
        EditorGUILayout.Space();

        c.transformOffset = EditorGUILayout.Vector3Field(
            "Visual Offset:",
            c.transformOffset
            );
        EditorGUILayout.Space();

        c.equipmentSlots = EditorGUIExt.ArrayFoldout(
            "Equipment Slots",
            c.equipmentSlots,
            ref showSlots,
            false,
            128,
            "body"
            );

        EditorGUILayout.Space();

        c.canMountF =
            EditorGUIExt.FormulaField(
                "Can Mount (t.)",
                c.canMountF ?? Formula.True(),
                "character.canMount.param",
                formulaOptions,
                lastFocusedControl,
                0
                );

        c.isMountableF =
            EditorGUIExt.FormulaField(
                "Mountable By (t.)",
                c.isMountableF ?? Formula.False(),
                "character.isMountable.param",
                formulaOptions,
                lastFocusedControl,
                0
                );

        c.EditorSetBaseStat("isTargetable",
                            EditorGUIExt.FormulaField(
                                "Is Targetable",
                                c.EditorGetBaseStat("isTargetable") ?? Formula.True(),
                                "character.isTargetable.param",
                                formulaOptions,
                                lastFocusedControl,
                                0
                                )
                            );

        c.stats = EditorGUIExt.ParameterFoldout(
            "Statistic",
            c.stats,
            "" + c.GetInstanceID(),
            formulaOptions,
            lastFocusedControl,
            ref showStats,
            skipStats
            );

        EditorGUILayout.Space();
    }
Exemplo n.º 3
0
 protected void ReactionSkillGUI()
 {
     s.reactionSkill = EditorGUILayout.Toggle(
         "Reaction Skill",
         s.reactionSkill
         );
     if (s.reactionSkill)
     {
         GUILayout.Label("Reaction Triggers");
         EditorGUILayout.HelpBox(
             "e.g. \"applied loses health\"",
             MessageType.Info
             );
         s.reactionStatChangesApplied = EditorGUIExt.StatChangeFoldout(
             "Stat Change (Applied)",
             s.reactionStatChangesApplied,
             ref showReactionStatChangesApplied
             );
         EditorGUILayout.HelpBox(
             "e.g. \"applied is hit by geomancy\"",
             MessageType.Info
             );
         s.reactionTypesApplied = EditorGUIExt.ArrayFoldout(
             "Reactable Type (Applied)",
             s.reactionTypesApplied,
             ref showReactionTypesApplied,
             false,
             -1,
             "attack"
             );
         EditorGUILayout.HelpBox(
             "e.g. \"applier loses MP\"",
             MessageType.Info
             );
         s.reactionStatChangesApplier = EditorGUIExt.StatChangeFoldout(
             "Stat Change (Applier)",
             s.reactionStatChangesApplier,
             ref showReactionStatChangesApplier
             );
         EditorGUILayout.HelpBox(
             "e.g. \"applier receives vampirism bonus\"",
             MessageType.Info
             );
         s.reactionTypesApplier = EditorGUIExt.ArrayFoldout(
             "Reactable Type (Applier)",
             s.reactionTypesApplier,
             ref showReactionTypesApplier,
             false,
             -1,
             "attack"
             );
         //reaction region
         //reaction effects
         s.reactionTargetRegion = EditorGUIExt.RegionGUI(
             "Reaction Target",
             s.name + ".reaction",
             s.reactionTargetRegion,
             formulaOptions,
             lastFocusedControl,
             Screen.width - 32
             );
         s.reactionEffectRegion = EditorGUIExt.RegionGUI(
             "Reaction Effect",
             s.name + ".reaction",
             s.reactionEffectRegion,
             formulaOptions,
             lastFocusedControl,
             Screen.width - 32
             );
         s.reactionApplicationEffects = EditorGUIExt.StatEffectGroupGUI(
             "Per-Reaction Effect",
             s.reactionApplicationEffects,
             StatEffectContext.Action,
             "" + s.GetInstanceID(),
             formulaOptions,
             lastFocusedControl
             );
         s.reactionEffects = EditorGUIExt.StatEffectGroupsGUI(
             "Per-Target Effect Group",
             s.reactionEffects,
             StatEffectContext.Action,
             "" + s.GetInstanceID(),
             formulaOptions,
             lastFocusedControl
             );
         EditorGUILayout.Space();
     }
 }