Пример #1
0
 private bool CheckTorsoIsClearedOut()
 {
     if (LocalPlayer.AnimControl.placedBodyGo)
     {
         CoopSliceAndDiceMutant component = LocalPlayer.AnimControl.placedBodyGo.GetComponent <CoopSliceAndDiceMutant>();
         if (component)
         {
             if (component.BodyParts.Sum((DamageCorpse b) => (!(b == null)) ? 0 : 1) == 5)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Пример #2
0
    private void Rotting()
    {
        ParticleSystem particleSystem = (ParticleSystem)UnityEngine.Object.Instantiate(Prefabs.Instance.FliesPSPrefab, base.transform.position, base.transform.rotation);

        particleSystem.transform.parent = base.transform;
        particleSystem.gameObject.SetActive(true);
        CoopSliceAndDiceMutant componentInParent = base.GetComponentInParent <CoopSliceAndDiceMutant>();

        if (componentInParent)
        {
            for (int i = 0; i < componentInParent.BodyParts.Length; i++)
            {
                if (componentInParent.BodyParts[i])
                {
                    componentInParent.BodyParts[i].infected = true;
                }
            }
        }
    }