protected void OnTriggerStay(Collider other) { if (other.get_gameObject().get_layer() == LayerSystem.NameToLayer(LayerSystem.GetGameObjectLayerName(EntityWorld.Instance.EntSelf.Camp, EntityWorld.Instance.EntSelf.LayerEntityNumber, 1))) { if (this.col != null && this.col.get_isTrigger()) { float num = this.radius - other.get_gameObject().GetComponent <CharacterController>().get_radius() - 0.4f; if (Vector3.Distance(other.get_gameObject().get_transform().get_position(), base.get_transform().get_position()) < num) { this.isTrigger = true; } } this.StayPlatform(other); } }
protected void OnTriggerExit(Collider other) { Debuger.Error("OnTriggerExit", new object[0]); if (other.get_gameObject().get_layer() == LayerSystem.NameToLayer(LayerSystem.GetGameObjectLayerName(EntityWorld.Instance.EntSelf.Camp, EntityWorld.Instance.EntSelf.LayerEntityNumber, 1))) { this.isTrigger = false; if (this.lastPosition == base.get_transform().get_position()) { this.isUp = !this.isUp; } this.lastPosition = Vector3.get_zero(); this.firstPosition = Vector3.get_zero(); this.LeavePlatform(other); this.startMove = null; this.endMove = null; } }
protected void OnTriggerEnter(Collider other) { Debuger.Error("OnTriggerEnter", new object[0]); if (other.get_gameObject().get_layer() == LayerSystem.NameToLayer(LayerSystem.GetGameObjectLayerName(EntityWorld.Instance.EntSelf.Camp, EntityWorld.Instance.EntSelf.LayerEntityNumber, 1))) { this.firstPosition = base.get_transform().get_position(); if (this.isUp) { this.lastPosition = this.endPoint.get_position(); } else { this.lastPosition = this.startPoint.get_position(); } this.EnterPlatform(other); } }