示例#1
0
 public SelectCursorPathTool(AdventureData adventureData, int t)
     : base(createResources(adventureData, t), createAssetInfoArray(t), Controller.ACTION_CUSTOM, 0)
 {
     this.adventureData = adventureData;
     this.t             = t;
     this.type          = DescriptorData.getCursorTypeString(t);
 }
示例#2
0
        protected static AssetInformation[] createAssetInfoArray(int t)
        {
            string type = DescriptorData.getCursorTypeString(t);

            AssetInformation[] array = new AssetInformation[1];
            array[0] = new AssetInformation("", type, true, AssetsConstants.CATEGORY_CURSOR, AssetsController.FILTER_NONE);
            return(array);
        }
        public void deleteCursor(int type)
        {
            string typeS    = DescriptorData.getCursorTypeString(type);
            int    position = -1;

            for (int i = 0; i < adventureData.getCursors().Count; i++)
            {
                if (adventureData.getCursors()[i].getType().Equals(typeS))
                {
                    position = i;
                    break;
                }
            }
            if (position >= 0)
            {
                Controller.getInstance().addTool(new DeleteCursorTool(adventureData, position));
            }
        }
示例#4
0
        protected static ResourcesUni createResources(AdventureData adventureData, int t)
        {
            string       type       = DescriptorData.getCursorTypeString(t);
            ResourcesUni resources  = new ResourcesUni();
            bool         introduced = false;

            for (int i = 0; i < adventureData.getCursors().Count; i++)
            {
                if (adventureData.getCursors()[i].getType().Equals(type) && adventureData.getCursors()[i].getPath() != null)
                {
                    resources.addAsset(type, adventureData.getCursors()[i].getPath());
                    introduced = true;
                    break;
                }
            }

            if (!introduced)
            {
                resources.addAsset(type, null);
            }

            return(resources);
        }
 public string getCursorPath(int type)
 {
     return(getCursorPath(DescriptorData.getCursorTypeString(type)));
 }