Esempio n. 1
0
        new public static MovementAction fromJSON(ObjectJSON json)
        {
            MovementAction output = new MovementAction();

            output.entityId = json.getInt("entityId");
            ArrayJSON path = json.getArrayJSON("path");

            output.path = new int[path.Length];
            for (int i = 0; i < path.Length; i++)
            {
                output.path[i] = path.getIntAt(i);
            }
            return(output);
        }
Esempio n. 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);
            }
        }