예제 #1
0
    private static Example.SkillParticle ExportSkillParticle(SkillParticle particle, List <Example.SkillParticle> particles)
    {
        Example.SkillParticle      skillParticle = new Example.SkillParticle();
        List <Example.SkillAction> skillActions  = new List <Example.SkillAction> ();

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

        foreach (var action in actions)
        {
            ExportSkillAction(action, skillActions);
        }

        Example.SkillPath skillPath = new Example.SkillPath();
        skillPath.pathType = particle.path.pathType;
        skillPath.Args     = ArrayToList(particle.path.arguments);

        Example.SkillShapeNew skillShape = ExportSkillShape(particle.hitShape);

        skillParticle.Id        = particles.Count;
        skillParticle.StartTime = particle.startFrame;
        skillParticle.Duration  = particle.duration;
        skillParticle.Effect    = particle.effectName;
        skillParticle.HitShape  = skillShape;
        skillParticle.Path      = skillPath;
        skillParticle.Actions   = skillActions;
        particles.Add(skillParticle);
        return(skillParticle);
    }
예제 #2
0
    private static Example.SkillParticle ExportSkillParticle(SkillParticleActionItem particle, List <Example.SkillParticle> particles)
    {
        if (!particle.export)
        {
            return(null);
        }
        Example.SkillParticle      skillParticle = new Example.SkillParticle();
        List <Example.SkillAction> skillActions  = new List <Example.SkillAction>();


        foreach (var action in particle.HitActions)
        {
            ExportSkillAction(action, skillActions);
        }
        var actions = particle.GetComponentsInChildren <SkillActionItem>();

        foreach (var action in actions)
        {
            ExportSkillAction(action, skillActions);
        }

        Example.SkillPath skillPath = new Example.SkillPath();
        skillPath.pathType = particle.path.pathType;
        skillPath.Args     = ArrayToList(particle.path.arguments);

        Example.SkillShapeNew skillShape = ExportSkillShape(particle.hitShape);
        Debug.Log("particle.hitShape " + particle.hitShape.Radius + " skillShape " + skillShape.Radius);
        skillParticle.IsBullet  = particle.isBullet;
        skillParticle.Id        = particles.Count;
        skillParticle.StartTime = Mathf.FloorToInt(particle.Firetime * 1000);
        skillParticle.Duration  = Mathf.FloorToInt(particle.Duration * 1000);
        skillParticle.Effect    = particle.EffectName;
        skillParticle.HitShape  = skillShape;
        skillParticle.Path      = skillPath;
        skillParticle.Actions   = skillActions;
        particles.Add(skillParticle);
        return(skillParticle);
    }