コード例 #1
0
        public static WrinkleDef AssignWrinkleDefFor(Pawn pawn)
        {
            IEnumerable <WrinkleDef> source = from wrinkle in DefDatabase <WrinkleDef> .AllDefs

                                                                        // where !wrinkle.forbiddenOnRace.Contains(pawn.def)
                                              where wrinkle.hairGender.ToString()
                                              == pawn.gender.ToString() // .SharesElementWith(factionType.hairTags)
                                              select wrinkle;

            WrinkleDef chosenWrinkles = source.FirstOrDefault();

            return(chosenWrinkles);
        }
コード例 #2
0
        private void InitializeGraphicsWrinkles()
        {
            Color wrinkleColor = this._pawn.story.SkinColor * new Color(0.1f, 0.1f, 0.1f);

            {
                wrinkleColor.a = this.pawnFace.WrinkleIntensity;

                WrinkleDef pawnFaceWrinkleDef = this.pawnFace.WrinkleDef;

                this.WrinkleGraphic = GraphicDatabase.Get <Graphic_Multi_NaturalHeadParts>(
                    pawnFaceWrinkleDef.texPath +
                    "_" +
                    this
                    ._compFace
                    .PawnCrownType + "_" +
                    this._compFace.PawnHeadType,
                    ShaderDatabase.Transparent,
                    Vector2.one,
                    wrinkleColor);

                this.RottingWrinkleGraphic = GraphicDatabase.Get <Graphic_Multi_NaturalHeadParts>(
                    pawnFaceWrinkleDef
                    .texPath + "_" +
                    this._compFace
                    .PawnCrownType +
                    "_" +
                    this
                    ._compFace
                    .PawnHeadType,
                    ShaderDatabase
                    .Transparent,
                    Vector2.one,
                    wrinkleColor *
                    FaceTextures
                    .SkinRottingMultiplyColor);
            }
        }