public TreeBuilder(GameController input, GameUI ui, CameraMover camera, TreeType type) : base(input, ui, camera, type.MyTypeInstance, Cost.Free) { this.type = type; InitUI(ui, out uiElem, out sizeSlider); }
public Tree(ILevelManager level, IBuilding building, TreeType type) : base(level, building) { this.type = type; }
/// <summary> /// /// </summary> /// <param name="level"></param> /// <param name="building"></param> /// <param name="growthTime">Time after which the tree grows into its full size</param> /// <param name="startSize">Start size of the tree as a multiplier of the standard size in prefab.</param> /// <param name="finalSize">Final size of the tree as a multiplier of the standard size in prefab.</param> /// <param name="type"></param> public Tree(ILevelManager level, IBuilding building, float growthTime, float startSize, float finalSize, TreeType type) : base(level, building) { this.type = type; this.curSpreadTimeout = SpreadTimeout; this.FinalSize = finalSize; this.changePerSecond = (finalSize - startSize) / growthTime; this.currentSize = startSize; building.Node.ScaleNode(startSize); }