internal Color GetColor(ProjectileColour newColor) { switch (newColor) { case ProjectileColour.Blue: return(Color.blue); case ProjectileColour.Green: return(Color.green); case ProjectileColour.Grey: return(Color.gray); case ProjectileColour.Orange: return(new Color(1f, 0.5f, 0f)); case ProjectileColour.Pink: return(new Color(1f, 0.08f, 0.58f)); case ProjectileColour.Red: return(Color.red); case ProjectileColour.Yellow: return(Color.yellow); } return(Color.gray); }
public void ChangeProjectileMaterial(ProjectileColour newColour) { projectileColour = newColour; baseColor = gameManager.GetColor(newColour); meshRenderer.material = gameManager.materials[(int)newColour]; // Do Projectile Type Things }