/** * Apply the new tool to the Factory */ internal override void ChangePaintTool(PaintTool newTreeTool, ColorTool presentColorTool) { TreeTool newTool = (TreeTool)newTreeTool; // TODO Is there any way TODO this without casting? treeAdded = false; this.presentTreeTool = newTool; this.presentColorTool = presentColorTool; this.growthSpeed = presentTreeTool.growthSpeed; growthCount = 0; }
// Return available paintTools internal List<PaintTool> getPaintTools() { //TODO Load paint tools from a data store instead. List<PaintTool> paintTools = new List<PaintTool>(); TreeTool woolTool = new TreeTool(0, "woolPaint", stringToToolType("TREE"), "sun.png", "WoolTree", 2, 500, 800, 25, 2, 0, 0, 10); TreeTool polyTool = new TreeTool(1, "polyPaint", stringToToolType("TREE"), "bolt.png", "PolyTree", 5, 7, 800, 10, 2, 0, 0, 7); TreeTool modernArtTool = new TreeTool(2, "modernArtPaint", stringToToolType("TREE"), "cloud.png", "ModernArtTree", 5, 4, 800, 100, 2, 5, 0, 10); TreeTool cellNetTool = new TreeTool(3, "cellNetPaint", stringToToolType("TREE"), "bullseye.png", "CellNetTree", 25, 300, 800, 25, 2, 5, 0, 10); TreeTool bubbleTool = new TreeTool(4, "bubblePaint", stringToToolType("TREE"), "cloud.png", "BubbleTree", 15, // branch length 10, // number of leaves 800, // max generation 120, // opacity 0, // branchWidth 1, // hullWidth 30,10 ); // leaf size TreeTool scribbleTool = new TreeTool(5, "scribblePaint", stringToToolType("TREE"), "bullseye.png", "ScribbleTree", 7, 4, 800, 100, 1, 3, 0, 10); paintTools.Add(woolTool); paintTools.Add(polyTool); paintTools.Add(modernArtTool); paintTools.Add(cellNetTool); paintTools.Add(bubbleTool); paintTools.Add(scribbleTool); return paintTools; }