コード例 #1
0
        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));
        }
コード例 #2
0
        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);
            }
        }