Esempio n. 1
0
        public override List <AssetDescriptor> GetDependencies(AssetManager manager, string path, FileInfo fileHandle, SpriteParameters param)
        {
            meshType      = DefaultMeshType;
            borders       = DefaultBorders;
            extrude       = DefaultExtrude;
            pixelsPerUnit = DefaultPixelsPerUnit;
            pivot         = DefaultPivot;

            textureParams = null;

            if (param != null)
            {
                textureParams            = new Texture2DParameters();
                textureParams.filterMode = param.filterMode;
                textureParams.wrapMode   = param.wrapMode;

                meshType = param.meshType;
                borders  = param.borders;
                extrude  = param.extrude;
                pivot    = param.pivot;

                if (param.pixelsPerUnit > 0)
                {
                    pixelsPerUnit = param.pixelsPerUnit;
                }
            }

            return(new List <AssetDescriptor>()
            {
                AssetDescriptor.Create <Texture2D>(path, textureParams)
            });
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (obj is Texture2DParameters == false)
            {
                return(false);
            }
            Texture2DParameters o = (Texture2DParameters)obj;

            return(filterMode == o.filterMode && wrapMode == o.wrapMode);
        }