Esempio n. 1
0
 // Token: 0x060004B3 RID: 1203 RVA: 0x000197D8 File Offset: 0x000179D8
 public static void ObjectTouchedSomething(AntiTouchObject antiTouchScript, Transform touchedObject)
 {
     if (antiTouchScript.antiTouchInBuildMode || (!antiTouchScript.antiTouchInBuildMode && !LevelManager.BuildModeOn))
     {
         if (antiTouchScript.badForPlayer && Tag.Compare(touchedObject, Tag.Tags.Player))
         {
             AntiTouchSystem.KillPlayer(touchedObject.transform.root.GetComponent <PlayerSettings>());
         }
         if (antiTouchScript.badForSmartRagdolls && Tag.Compare(touchedObject, Tag.Tags.Ragdoll))
         {
             if (antiTouchScript.specifiedSmartRagdolls.Length != 0)
             {
                 for (int i = 0; i < antiTouchScript.specifiedSmartRagdolls.Length; i++)
                 {
                     if (SmartRagdollController.RagdollHasLogic(touchedObject, antiTouchScript.specifiedSmartRagdolls[i]))
                     {
                         AntiTouchSystem.KillSmartRagdoll(touchedObject);
                         return;
                     }
                 }
                 return;
             }
             AntiTouchSystem.KillSmartRagdoll(touchedObject);
         }
     }
 }
Esempio n. 2
0
 // Token: 0x060004B7 RID: 1207 RVA: 0x00005E1E File Offset: 0x0000401E
 public static void SetAntiTouchValues(AntiTouchObject _antiTouchSettings, bool _badForPlayer, bool _badforSmartRagdolls, bool _deathOnTouch, bool?_ragdollsCanTouchPlayer = null)
 {
     if (_antiTouchSettings != null)
     {
         _antiTouchSettings.badForPlayer        = _badForPlayer;
         _antiTouchSettings.badForSmartRagdolls = _badforSmartRagdolls;
         if (AntiTouchSystem.reference != null && _ragdollsCanTouchPlayer != null)
         {
             AntiTouchSystem.reference.ragdollsCanTouchPlayer = _ragdollsCanTouchPlayer.Value;
         }
     }
 }
Esempio n. 3
0
 // Token: 0x060004AD RID: 1197 RVA: 0x000196F4 File Offset: 0x000178F4
 private void CopyVariablesToScript(AntiTouchObject script)
 {
     if (script == null)
     {
         return;
     }
     script.triggerCollisions      = this.triggerCollisions;
     script.colliderCollisions     = this.colliderCollisions;
     script.badForPlayer           = this.badForPlayer;
     script.badForSmartRagdolls    = this.badForSmartRagdolls;
     script.specifiedSmartRagdolls = this.specifiedSmartRagdolls;
     script.antiTouchInBuildMode   = this.antiTouchInBuildMode;
     script.surpassCooldown        = this.surpassCooldown;
 }