Exemplo n.º 1
0
        public NamedFilter(string name, string nonLocalizedName)
        {
            this.name             = name;
            this.nonLocalizedName = nonLocalizedName;

            // Note that we use both names in the upid.  This allows us to
            // recreate the filters at level load time even though we don't
            // have the actors yet.
            upid  = "filter.named." + name + "." + nonLocalizedName;
            label = name;

            description = CardSpace.Localize("filter.named") + " " + name;

            // NamedFilters are not read from CardSpace.xml, so we must assign initialize these fields manually.
            icon       = "image_missing";
            group      = "group.named";
            helpGroups = new string[] { "objects", "bots" };
            groupObj   = CardSpace.Cards.GetGroup(group);

            XmlInputs.Add(SensorOutputType.ActorSet);

            XmlNegOutputs.Add(SensorOutputType.TerrainMaterial);
            XmlNegOutputs.Add(SensorOutputType.WaterMaterial);
            XmlNegOutputs.Add(SensorOutputType.TouchButton);
            XmlNegOutputs.Add(SensorOutputType.Real);

            XmlCategories.Add(BrainCategories.NamedFilter);

            XmlInclusions.Add(BrainCategories.ExplicitSubject);

            XmlExclusions.Add(BrainCategories.ObjectFilter);

            OnLoad();
        }   // end of c'tor
Exemplo n.º 2
0
 public TimeCard(string fullFilename)
     : base(new XmlDataSource(fullFilename), Resources.XMLRootNode)
 {
     //Categories    = new XMLHash<Category>(XMLDataSource, Resources.XMLNodeGroup_Categories, Resources.XMLNodeName_Category);
     Categories = new XmlCategories(XmlDataSource, Resources.XMLNodeGroup_Categories, Resources.XMLNodeName_Category);
     Projects = new XmlList<Project>(XmlDataSource, Resources.XMLNodeGroup_Projects, Resources.XMLNodeName_Project);
     TaskMgr       = new XmlList<Task>(XmlDataSource, Resources.XMLNodeGroup_Tasks, Resources.XMLNodeName_Task);
     TimeEntries   = new XmlList<TimeEntry>(XmlDataSource, Resources.XMLNodeGroup_TimeEntries, Resources.XMLNodeName_TimeEntry);
 }