예제 #1
0
        private void Update()
        {
            if (colourPreset != lastColourPreset && colourPreset >= 0)
            {
                lastColourPreset = colourPreset;

                palette = ColourCatalogue.GetColourSet(colourPreset);
                UpdateShader();
            }
        }
예제 #2
0
        private void UpdateUIColours(int colourSetIndex)
        {
            var colourSet = ColourCatalogue.GetColourSet(colourSetIndex);

            Color cFill = colourSet[colourFillIndex];

            cFill.a             = 1;
            colourBoxFill.color = cFill;

            Color cBorder = colourSet[colourBorderIndex];

            cBorder.a             = 1;
            colourBoxBorder.color = cBorder;
        }
예제 #3
0
        public static void SetDragonAsPlayer(
            PlayerCustomisationData cData,
            GameObject dragon,
            bool changeColour = true)
        {
            PlayerInput pl = dragon.AddComponent <PlayerInput>();

            pl.leftKey  = cData.LeftButton;
            pl.rightKey = cData.RightButton;

            if (changeColour)
            {
                Palette pal = dragon.GetComponent <Palette>();
                pal.ColourSet = ColourCatalogue.GetColourSet(cData.ColourSetIndex);
            }
        }