public void Initialise(PaintController.PaintValue paintValue, bool local) { barType = paintValue.paintType; barFillAmount = 0; barColorFill.fillAmount = 0; barColorFill.color = paintValue.paintColor; barBackgroundFill.color = new Color(paintValue.paintColor.r, paintValue.paintColor.g, paintValue.paintColor.b, 0.1f); if (local) { ToggleUI(false); } }
public void Initialise(PaintController.PaintValue paintValue) { myPaintType = paintValue.paintType; paintFillAmount = paintValue.paintValue; for (int i = 0; i < imageBackgrounds.Count; i++) { imageBackgrounds[i].image.color = new Color(paintValue.paintColor.r, paintValue.paintColor.g, paintValue.paintColor.b, imageBackgrounds[i].alpha); } imageFill.color = paintValue.paintColor; imageFill.fillAmount = paintFillAmount / 100; PlayerManager.instance.entity.paintController.OnPaintValueModified += PaintController_OnPaintValueModified; PlayerManager.instance.entity.paintController.OnPaintValueReset += PaintController_OnPaintValueReset; }