FlatRedBall.Glue.GuiDisplay.AvailableAnimationChainsStringConverter.GetAnimationChainListFile C# (CSharp) Method

GetAnimationChainListFile() private method

private GetAnimationChainListFile ( IElement element, NamedObjectSave referencedNos, StateSave stateSave ) : AnimationChainListSave
element IElement
referencedNos FlatRedBall.Glue.SaveClasses.NamedObjectSave
stateSave FlatRedBall.Glue.SaveClasses.StateSave
return AnimationChainListSave
        private AnimationChainListSave GetAnimationChainListFile(IElement element, NamedObjectSave referencedNos, StateSave stateSave)
        {
            AnimationChainListSave acls = null;

            if (referencedNos != null)
            {
                if (referencedNos.SourceType == SourceType.File &&
                    !string.IsNullOrEmpty(referencedNos.SourceFile) &&
                    !string.IsNullOrEmpty(referencedNos.SourceName) &&
                    referencedNos.SourceFile.EndsWith(".scnx"))
                {
                    // This is the AnimationChainListSave
                    // referenced by the file...
                    acls = GetAnimationChainListFromScnxReference(referencedNos);

                    // ... but the user may be overriding that
                    // through variables, so let's check if that's
                    // the case
                    AnimationChainListSave foundAcls = GetReferencedAclsThroughSetVariables(element, referencedNos, stateSave);
                    if (foundAcls != null)
                    {
                        acls = foundAcls;
                    }

                }
                else if (referencedNos.SourceType == SourceType.FlatRedBallType &&
                    (referencedNos.SourceClassType == "Sprite" || referencedNos.SourceClassType == "SpriteFrame" ||
                     referencedNos.SourceClassType == "FlatRedBall.Sprite" || referencedNos.SourceClassType == "FlatRedBall.ManagedSpriteGroups.SpriteFrame"
                    ))
                {
                    AnimationChainListSave foundAcls = GetReferencedAclsThroughSetVariables(element, referencedNos, stateSave);

                    acls = foundAcls;


                }
            }
            return acls;
        }