Esempio n. 1
0
    private static Example.SkillEvent ExportSkillEvent(SkillEvent evt, List <Example.SkillEvent> events)
    {
        Example.SkillEvent skillEvent = new Example.SkillEvent();

        List <Example.SkillAction> skillActions = new List <Example.SkillAction> ();

        var actions = evt.GetComponentsInChildren <SkillAction> ();

        foreach (var action in actions)
        {
            ExportSkillAction(action, skillActions);
        }
        skillEvent.Id         = events.Count;
        skillEvent.eventType  = evt.eventType;
        skillEvent.Conditions = ArrayToList(evt.conditions);
        skillEvent.Actions    = skillActions;
        events.Add(skillEvent);
        return(skillEvent);
    }