示例#1
0
    // Token: 0x06001007 RID: 4103 RVA: 0x00070E80 File Offset: 0x0006F080
    private void UpdateFloaters()
    {
        if (this.m_inWater.Count == 0)
        {
            return;
        }
        IWaterInteractable waterInteractable = null;

        foreach (IWaterInteractable waterInteractable2 in this.m_inWater)
        {
            if (waterInteractable2.IsOwner())
            {
                Transform transform = waterInteractable2.GetTransform();
                if (transform)
                {
                    float waterSurface = this.GetWaterSurface(transform.position, 1f);
                    waterInteractable2.SetInWater(waterSurface);
                }
                else
                {
                    waterInteractable = waterInteractable2;
                }
            }
        }
        if (waterInteractable != null)
        {
            this.m_inWater.Remove(waterInteractable);
        }
    }
示例#2
0
    // Token: 0x06001006 RID: 4102 RVA: 0x00070E48 File Offset: 0x0006F048
    private void OnTriggerEnter(Collider collider)
    {
        IWaterInteractable component = collider.attachedRigidbody.GetComponent <IWaterInteractable>();

        if (component != null && !this.m_inWater.Contains(component))
        {
            this.m_inWater.Add(component);
        }
    }
示例#3
0
    // Token: 0x06001008 RID: 4104 RVA: 0x00070F24 File Offset: 0x0006F124
    private void OnTriggerExit(Collider collider)
    {
        IWaterInteractable component = collider.attachedRigidbody.GetComponent <IWaterInteractable>();

        if (component != null)
        {
            component.SetInWater(-10000f);
            this.m_inWater.Remove(component);
        }
    }