public virtual void OnTouch(Collider collider) { Debugger.Log("Attack 0"); if (!base.enabled) { return; } if (this.frozen) { return; } if (this.creature.Aggression.Value < this.biteAggressionThreshold) { return; } if (Time.time < this.timeLastBite + this.biteInterval) { return; } GameObject target = this.GetTarget(collider); if (this.ignoreSameKind && global::Utils.CompareTechType(base.gameObject, target)) { return; } Debugger.Log("Attack 1"); if (this.CanBite(target)) { Debugger.Log("Attack 2"); this.timeLastBite = Time.time; LiveMixin component2 = target.GetComponent <LiveMixin>(); if (component2 != null && component2.IsAlive()) { component2.TakeDamage(this.GetBiteDamage(target), default(Vector3), DamageType.Normal, null); component2.NotifyCreatureDeathsOfCreatureAttack(); } Vector3 position = collider.ClosestPointOnBounds(this.mouth.transform.position); if (this.damageFX != null) { UnityEngine.Object.Instantiate <GameObject>(this.damageFX, position, this.damageFX.transform.rotation); } if (this.attackSound != null) { global::Utils.PlayEnvSound(this.attackSound, position, 20f); } this.creature.Aggression.Add(-this.biteAggressionDecrement); if (component2 != null && !component2.IsAlive()) { this.TryEat(component2.gameObject, false); } base.gameObject.SendMessage("OnMeleeAttack", target, SendMessageOptions.DontRequireReceiver); } }