Example #1
0
        protected virtual NodeObject CreateObjectFromFile(ResourceItem resourceFile)
        {
            NodeObject result;

            if (resourceFile is ImageFile || resourceFile is PlistImageFile)
            {
                result = new SpriteObject(resourceFile as ResourceFile);
            }
            else
            {
                if (resourceFile is Project)
                {
                    Project project = resourceFile as Project;
                    if (project.IsGameProject())
                    {
                        result = new ProjectNodeObject(project);
                        return(result);
                    }
                }
                else if (resourceFile is AudioFile)
                {
                    result = new SimpleAudioObject(resourceFile as ResourceFile);
                    return(result);
                }
                result = null;
            }
            return(result);
        }
        protected override void SetValue(object cObject, object cInnerObject)
        {
            base.SetValue(cObject, cInnerObject);
            SimpleAudioObject simpleAudioObject = cObject as SimpleAudioObject;

            if (simpleAudioObject != null)
            {
                simpleAudioObject.FileData = this.FileData;
                simpleAudioObject.Loop     = this.Loop;
            }
        }