public void ChangeGameColour(float hue)
        {
            Color colour = Color.HSVToRGB(hue, 0.73f, 1f);

            SaveDataManager <OrbitalSaveData> .data.colour = colour;
            SaveDataManager <OrbitalSaveData> .SaveData();

            ColourLoader.UpdateAllColours();
        }
Example #2
0
        void Awake()
        {
            trailRenderer = GetComponent <TrailRenderer>();

            scoremanager        = GameObject.Find("ScoreManager").GetComponent <ScoreManager>();
            ballPowerText       = GameObject.Find("BallPowerText").GetComponent <Text>();
            ballPowerTextColour = ballPowerText.GetComponent <ColourLoader>();

            rigidbody2D = GetComponent <Rigidbody2D>();

            if (deathEffectPool == null)
            {
                deathEffectPool = new Pool <DeathEffect>(deathEffectPrefab, 1);
            }
        }
        // Set score texts and resets current score and multiplier
        void Start()
        {
            highScore = SaveDataManager <OrbitalSaveData> .data.highscore;

            currentScore = 0;
            multiplier   = 0;

            currentScoreText.text = "Score: " + currentScore.ToString("F0");
            multiplierText.text   = "COMBO: " + multiplier.ToString("F0");
            highScoreText.text    = "HI: " + highScore.ToString("F0");

            scoreTextColour      = currentScoreText.GetComponent <ColourLoader>();
            multiplierTextColour = multiplierText.GetComponent <ColourLoader>();
            highScoreTextColour  = highScoreText.GetComponent <ColourLoader>();
        }