private void OnTriggerStay(Collider other) { if (this.Mop.Bloodiness < 100f && other.tag == "Puddle") { this.BloodPool = other.gameObject.GetComponent <BloodPoolScript>(); if (this.BloodPool != null) { this.BloodPool.Grow = false; other.transform.localScale -= new Vector3(Time.deltaTime, Time.deltaTime, Time.deltaTime); if (this.BloodPool.Blood) { this.Mop.Bloodiness += Time.deltaTime * 10f; this.Mop.UpdateBlood(); } if (other.transform.localScale.x < 0.1f) { UnityEngine.Object.Destroy(other.gameObject); return; } } else { UnityEngine.Object.Destroy(other.gameObject); } } }
public void RecordAllBlood() { this.PoolID = 0; this.FootprintID = 0; foreach (object obj in base.transform) { Transform transform = (Transform)obj; BloodPoolScript component = transform.GetComponent <BloodPoolScript>(); if (component != null) { this.PoolID++; if (this.PoolID < 100) { this.BloodPositions[this.PoolID] = transform.position; this.BloodRotations[this.PoolID] = transform.eulerAngles; this.BloodSizes[this.PoolID] = component.TargetSize; } } else { this.FootprintID++; if (this.FootprintID < 100) { this.FootprintPositions[this.FootprintID] = transform.position; this.FootprintRotations[this.FootprintID] = transform.eulerAngles; } } } }