Exemple #1
0
        new public static QuickSpellAction fromJSON(ObjectJSON json)
        {
            QuickSpellAction output = new QuickSpellAction();

            output.entityId     = json.getInt("entityId");
            output.spellId      = json.getString("spellId");
            output.targetCellId = json.getInt("targetCellId");
            return(output);
        }
Exemple #2
0
        public static Action fromJSON(ObjectJSON json)
        {
            switch (json.getString("class"))
            {
            case "QuickSpellAction":
                return(QuickSpellAction.fromJSON(json));

            case "MovementAction":
                return(MovementAction.fromJSON(json));

            case "SlowSpellAction":
                return(SlowSpellAction.fromJSON(json));

            default:
                return(null);
            }
        }