public void SetValues(TankScriptable tankScriptable) { health = tankScriptable.health; healthSlider.maxValue = health; tankType = tankScriptable.tankType; movementSpeed = tankScriptable.movementSpeed; turnSpeed = tankScriptable.turnSpeed; for (int i = 0; i < tankParts.Length; i++) { tankParts[i].material = tankScriptable.material; } }
private void GetTankType() { int rand = Random.Range(0, tankList.Length); tankScriptable = tankList[rand]; }