Make icon color customizable

This commit is contained in:
2025-06-18 20:46:39 -07:00
parent 96090090fa
commit d5e2601cb9
4 changed files with 2638 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ public class GamePlayer : MonoBehaviour
void Awake()
{
var backgroundColor = PlayerPrefs.GetString("BackgroundColor", "58;58;58").Split(";");
var birdColor = PlayerPrefs.GetString("BirdColor", "255;255;255").Split(";");
try
{
Camera.main.backgroundColor = new Color(
@@ -50,6 +51,11 @@ public class GamePlayer : MonoBehaviour
int.Parse(backgroundColor[1])/255f,
int.Parse(backgroundColor[2])/255f
);
bird.GetComponent<SpriteRenderer>().color = new Color(
int.Parse(birdColor[0])/255f,
int.Parse(birdColor[1])/255f,
int.Parse(birdColor[2])/255f
);
}
catch
{