public void InitializeColours(ColourData colourData) { this.colourData = colourData; Debug.Log("Init player colours"); GetComponents(); currentColourIndex = (uint)Random.Range(0, colourData.size); spriteRenderer.color = colourData.GetColourFromIndex(currentColourIndex); }
public void ChangeColour() { currentColourIndex = colourData.GetRandomColourIndex(currentColourIndex); spriteRenderer.color = colourData.GetColourFromIndex(currentColourIndex); }
public void InitializeColours(ColourData colourData) { this.colourData = colourData; GetComponents(); spriteRenderer.color = colourData.GetColourFromIndex(colourIndex); }