Exemple #1
0
        private void InitializeGraphicsEyePatches()
        {
            if (!this._compFace.TexPathEyeLeftPatch.NullOrEmpty())
            {
                bool flag = !ContentFinder <Texture2D> .Get(this._compFace.TexPathEyeLeftPatch + STR_Front, false)
                            .NullOrBad();

                if (flag)
                {
                    this.EyeLeftPatchGraphic =
                        GraphicDatabase.Get <Graphic_Multi_AddedHeadParts>(this._compFace.TexPathEyeLeftPatch,
                                                                           ShaderDatabase.Transparent,
                                                                           Vector2.one,
                                                                           Color.white) as Graphic_Multi_AddedHeadParts;
                    this._compFace.BodyStat.EyeLeft = PartStatus.Artificial;
                }
                else
                {
                    Log.Message(
                        "Facial Stuff: No texture for added part: " + this._compFace.TexPathEyeLeftPatch
                        + " - Graphic_Multi_AddedHeadParts");
                }
            }

            if (!this._compFace.TexPathEyeRightPatch.NullOrEmpty())
            {
                bool flag2 = !ContentFinder <Texture2D> .Get(this._compFace.TexPathEyeRightPatch + STR_Front, false)
                             .NullOrBad();

                if (flag2)
                {
                    this.EyeRightPatchGraphic =
                        GraphicDatabase.Get <Graphic_Multi_AddedHeadParts>(this._compFace.TexPathEyeRightPatch,
                                                                           ShaderDatabase.Transparent,
                                                                           Vector2.one,
                                                                           Color.white) as Graphic_Multi_AddedHeadParts;
                    this._compFace.BodyStat.EyeRight = PartStatus.Artificial;
                }
                else
                {
                    Log.Message(
                        "Facial Stuff: No texture for added part: " + this._compFace.TexPathEyeRightPatch
                        + " - Graphic_Multi_AddedHeadParts");
                }
            }
        }
Exemple #2
0
        private void InitializeGraphicsEyePatches()
        {
            if (!this._compFace.TexPathEyeLeftPatch.NullOrEmpty())
            {
                bool leftTexExists = this.EyePatchLeftTexExists();
                if (leftTexExists)
                {
                    this.EyeLeftPatchGraphic =
                        GraphicDatabase.Get <Graphic_Multi_AddedHeadParts>(this._compFace.TexPathEyeLeftPatch,
                                                                           ShaderDatabase.Transparent,
                                                                           Vector2.one,
                                                                           Color.white) as Graphic_Multi_AddedHeadParts;
                    this._compFace.BodyStat.EyeLeft = PartStatus.Artificial;
                }
                else
                {
                    Log.Message(
                        "Facial Stuff: No texture for added part: " + this._compFace.TexPathEyeLeftPatch
                        + " - Graphic_Multi_AddedHeadParts");
                }
            }

            if (!this._compFace.TexPathEyeRightPatch.NullOrEmpty())
            {
                bool rightTexExists = this.EyePatchRightTexExists();
                if (rightTexExists)
                {
                    this.EyeRightPatchGraphic =
                        GraphicDatabase.Get <Graphic_Multi_AddedHeadParts>(this._compFace.TexPathEyeRightPatch,
                                                                           ShaderDatabase.Transparent,
                                                                           Vector2.one,
                                                                           Color.white) as Graphic_Multi_AddedHeadParts;
                    this._compFace.BodyStat.EyeRight = PartStatus.Artificial;
                }
                else
                {
                    Log.Message("Facial Stuff: No texture for added part: " + this._compFace.TexPathEyeRightPatch
                                + " - Graphic_Multi_AddedHeadParts");
                }
            }
        }