private void Update() { if (colourPreset != lastColourPreset && colourPreset >= 0) { lastColourPreset = colourPreset; palette = ColourCatalogue.GetColourSet(colourPreset); UpdateShader(); } }
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; }
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); } }