public override bool doTool() { // if( resources.getAssetPath( type ).Equals( "NULL" ) ) { if (resources.getAssetPath(type) == null) { removed = false; } else { for (int i = 0; i < adventureData.getArrows().Count; i++) { CustomArrow arrow = adventureData.getArrows()[i]; if (arrow.getType().Equals(type)) { adventureData.getArrows().Remove(arrow); break; } } removed = true; } bool done = base.doTool(); if (!done) { return(false); } else { setArrow(type, resources.getAssetPath(type)); return(true); } }
protected static ResourcesUni createResources(AdventureData adventureData, string type) { ResourcesUni resources = new ResourcesUni(); bool introduced = false; for (int i = 0; i < adventureData.getArrows().Count; i++) { CustomArrow customArrow = adventureData.getArrows()[i]; if (customArrow.getType().Equals(type)) { resources.addAsset(type, customArrow.getPath()); introduced = true; break; } } if (!introduced) { resources.addAsset(type, null); } return(resources); }