Exemplo n.º 1
0
        public ArrayList GetContent( OpsContext context )
        {
            if( Command.Content == ContentType.MODELS )
                return context.FindModels(ContentRegex);
            else if( Command.Content == ContentType.TEXTURES )
                return context.FindTextures(ContentRegex);

            string errorStr = "OpsStatement.GetContent should not be used with commands for content type: " + Command.Content;
            System.Diagnostics.Debug.Assert(false, errorStr);
            
            throw new OpsException(errorStr);
        }
Exemplo n.º 2
0
        public ArrayList GetContent(OpsContext context)
        {
            if (Command.Content == ContentType.MODELS)
            {
                return(context.FindModels(ContentRegex));
            }
            else if (Command.Content == ContentType.TEXTURES)
            {
                return(context.FindTextures(ContentRegex));
            }

            string errorStr = "OpsStatement.GetContent should not be used with commands for content type: " + Command.Content;

            System.Diagnostics.Debug.Assert(false, errorStr);

            throw new OpsException(errorStr);
        }
Exemplo n.º 3
0
        //IOpsCommand
        public void Run(OpsContext context, OpsStatement statement)
        {
    
            UnloadArguments args = statement.Arguments as UnloadArguments;


            if( args.Type == ContentType.GENERIC || args.Type == ContentType.MODELS )
            {
                ArrayList models = context.FindModels(args.Src);
                foreach( OpsModel model in models )
                {
                    OpsConsole.WriteLine( "Unloading model: '{0}'", model.Name );
                    context.RemoveModel(model.Name);
                }
            }

            if( args.Type == ContentType.GENERIC || args.Type == ContentType.TEXTURES )
            {
                ArrayList textures = context.FindTextures(args.Src);    
                foreach( OpsTexture texture in textures )
                {
                    OpsConsole.WriteLine( "Unloading texture: '{0}'", texture.Name );
                    context.RemoveTexture(texture.Name);
                }
            }
        }