public void setFromUpgradeSpecs(UpgradeLevel.Specs specs, bool setTimeToCapacity = true) { this.specs = specs; if (setTimeToCapacity) { fartTime = specs.fartCapacity; glideTime = specs.glideCapacity; } }
public UpgradeLevel.Specs getSpecs(int[] levels) { var specs = new UpgradeLevel.Specs(); specs.bubbleGumCount = upgradeLevels[levels[(int)UpgradeLevel.Type.BubbleGum]] .specs.bubbleGumCount; specs.carrotSprayCount = upgradeLevels[levels[(int)UpgradeLevel.Type.CarrotSpray]] .specs.carrotSprayCount; specs.fartCapacity = upgradeLevels[levels[(int)UpgradeLevel.Type.PowerUpFart]] .specs.fartCapacity; specs.fartForce = upgradeLevels[levels[(int)UpgradeLevel.Type.PowerUpFart]] .specs.fartForce; specs.glideCapacity = upgradeLevels[levels[(int)UpgradeLevel.Type.PowerUpGlide]].specs.glideCapacity; specs.magnetRadius = upgradeLevels[levels[(int)UpgradeLevel.Type.Magnet]] .specs.magnetRadius; return specs; }