// Token: 0x06000407 RID: 1031 RVA: 0x000176B8 File Offset: 0x000158B8 private GameObject SpawnRagdoll() { this.spawnedRagdoll = UnityEngine.Object.Instantiate <GameObject>(this.ragdollPrefab, base.transform.position, base.transform.rotation); if (this.spawnSpecificSkins.Count > 0) { RagdollStyleManager.AssignSmartRagdollSkin(this.spawnedRagdoll.transform, this.spawnSpecificSkins[UnityEngine.Random.Range(0, this.spawnSpecificSkins.Count)]); } this.ApplyRagdollSettings(this.spawnedRagdoll); this.spawnedRagdoll.SetActive(false); return(this.spawnedRagdoll); }
// Token: 0x06000408 RID: 1032 RVA: 0x00017744 File Offset: 0x00015944 private void ApplyRagdollSettings(GameObject ragdoll) { if (this.spawnSpecificSkins.Count > 0) { RagdollStyleManager.AssignSmartRagdollSkin(ragdoll.transform, this.spawnSpecificSkins[UnityEngine.Random.Range(0, this.spawnSpecificSkins.Count)]); } this.antiTouchObject = ragdoll.GetComponentInChildren <AntiTouchObject>(); this.ragdollController = ragdoll.GetComponentInChildren <SmartRagdollController>(); this.agentController = this.ragdollController.agentController; if (this.antiTouchObject != null) { this.antiTouchObject.badForPlayer = this.RagdollIsAntiTouchBasedOnSkin(RagdollStyleManager.GetSmartRagdollSkinType(ragdoll.transform)); } if (this.ragdollController != null) { this.ragdollController.enableSuicide = this.suicide; this.ragdollController.suicideTimeFrame = this.suicideTimeFrame; this.ragdollController.doOnRagdollMode = SmartRagdollController.OnRagdollMode.Hide; if (this.agentController != null) { this.agentController.speed = this.ragdollRunSpeed; if (this.targetIsPlayer) { this.ragdollController.logic = SmartRagdollController.Logic.Attack; return; } if (this.targets.Count > 0) { this.ragdollController.useLogicConditions = false; this.agentController.target = this.targets[UnityEngine.Random.Range(0, this.targets.Count)]; this.agentController.moveMethod = AgentController.MoveMethod.MoveToPosition; return; } this.ragdollController.useLogicConditions = true; this.ragdollController.logic = SmartRagdollController.Logic.Explore; } } }