Example #1
0
 // Update the meshes to correct UVs depending on the property lookingAt (direction from human.movement)
 public void UpdateLookingAt(Direction dir)
 {
     this.bodyGraphic = GraphicInstance.GetNew(
         this.human.def.graphics,
         Defs.colorPallets["human_body"].colors[this.skinData.bodyColorID],
         Res.textures["Body_" + (this.skinData.bodyID).ToString()],
         0,
         MeshPool.GetHumanPlaneMesh(this.size, dir)
         );
     this.headGraphic = GraphicInstance.GetNew(
         this.human.def.graphics,
         Defs.colorPallets["human_body"].colors[this.skinData.bodyColorID],
         Res.textures["Head_" + (this.skinData.headID).ToString()],
         1,
         MeshPool.GetHumanPlaneMesh(this.size, dir)
         );
     this.eyesGraphic = GraphicInstance.GetNew(
         this.human.def.graphics,
         Color.white,
         Res.textures["Eye_" + (this.skinData.eyeID).ToString()],
         2,
         MeshPool.GetHumanPlaneMesh(this.size, dir)
         );
     this.hairGraphic = GraphicInstance.GetNew(
         this.human.def.graphics,
         Defs.colorPallets["human_hair"].colors[this.skinData.hairColorID],
         Res.textures["Hair_" + (this.skinData.hairID).ToString()],
         3,
         MeshPool.GetHumanPlaneMesh(this.size, dir)
         );
 }