public void ChangeColour(Colouration.Colours colour) { // TODO: Call ChangeObjectColour(itemheld[if not null]) // Activate/deactivate colourised GameObject instances foreach (var g in colouredObjects) { g.GetComponent <Colouration>().ReactToLight(colour); } // Change scene lighting -- stub code using GameObjects (UI panels pretending to be filters) redLight.SetActive(colour == Colouration.Colours.R); greenLight.SetActive(colour == Colouration.Colours.G); blueLight.SetActive(colour == Colouration.Colours.B); }
public void AddLens(Colouration.Colours colour) { int insertionIndex = 0; switch (colour) { case Colouration.Colours.R: insertionIndex = 0; break; case Colouration.Colours.B: insertionIndex = 1; break; case Colouration.Colours.G: insertionIndex = 2; break; } colourWheel[insertionIndex] = colour; ApplyCurrentColour(); // In case the lens is added to the currently active slot. }