コード例 #1
0
        public static ScriptNode FindAnimateableProp(ScriptNode prop)
        {
            if (prop.GetCanvas() != null)
            {
                return(prop);
            }

            string[] names = new[]
            {
                "move", "fly", "die", "stand", "iconRaw", "icon"
                , "effect/default"
                , "effect"
            };

            // Find any node that is usable for rendering
            foreach (var name in names)
            {
                var x = prop.GetNode(name);
                if (x == null)
                {
                    continue;
                }
                return(x);
            }

            if (prop.HasChild("0"))
            {
                return(prop);
            }

            return(null);
        }