public Texture2D SetOverlayTex(byte[] overlayTex, TexType overlayType) { if (overlayType == TexType.EyeOver || overlayType == TexType.EyeUnder) { SetOverlayTex(overlayTex, overlayType + 2); return(SetOverlayTex(overlayTex, overlayType + 4)); } OverlayStorage.SetTexture(overlayType, overlayTex); UpdateTexture(overlayType); return(OverlayStorage.GetTexture(overlayType)); }
internal IEnumerable <Texture2D> GetOverlayTextures(TexType overlayType) { if (IsShown(overlayType)) { var tex = OverlayStorage.GetTexture(overlayType); if (tex) { yield return(tex); } } foreach (var additionalTexture in AdditionalTextures.Where(x => x.OverlayType == overlayType && x.Texture != null).OrderBy(x => x.ApplyOrder)) { yield return(additionalTexture.Texture); } }