// Token: 0x06001E4D RID: 7757 RVA: 0x0008EEA8 File Offset: 0x0008D0A8 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!this.alive) { return; } Collider collider = impactInfo.collider; if (collider) { HurtBox component = collider.GetComponent <HurtBox>(); if (component) { Vector3 position = base.transform.position; Vector3 estimatedPointOfImpact = impactInfo.estimatedPointOfImpact; Quaternion identity = Quaternion.identity; if (this.rigidbody) { Util.QuaternionSafeLookRotation(this.rigidbody.velocity); } GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.impalePrefab, component.transform); gameObject.transform.position = estimatedPointOfImpact; gameObject.transform.rotation = base.transform.rotation; } } }
// Token: 0x06001F37 RID: 7991 RVA: 0x00087860 File Offset: 0x00085A60 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!base.enabled) { return; } this.TrySticking(impactInfo.collider, impactInfo.estimatedImpactNormal); }
// Token: 0x06001E49 RID: 7753 RVA: 0x0008ECCC File Offset: 0x0008CECC public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!this.alive) { return; } Collider collider = impactInfo.collider; this.impactNormal = impactInfo.estimatedImpactNormal; if (collider) { DamageInfo damageInfo = new DamageInfo(); if (this.projectileDamage) { damageInfo.damage = this.projectileDamage.damage; damageInfo.crit = this.projectileDamage.crit; damageInfo.attacker = (this.projectileController.owner ? this.projectileController.owner.gameObject : null); damageInfo.inflictor = base.gameObject; damageInfo.position = impactInfo.estimatedPointOfImpact; damageInfo.force = this.projectileDamage.force * base.transform.forward; damageInfo.procChainMask = this.projectileController.procChainMask; damageInfo.procCoefficient = this.projectileController.procCoefficient; } else { Debug.Log("No projectile damage component!"); } HurtBox component = collider.GetComponent <HurtBox>(); if (component) { if (this.destroyOnEnemy) { HealthComponent healthComponent = component.healthComponent; if (healthComponent) { if (healthComponent.gameObject == this.projectileController.owner) { return; } if (this.projectileHealthComponent && healthComponent == this.projectileHealthComponent) { return; } this.alive = false; } } } else if (this.destroyOnWorld) { this.alive = false; } this.hasImpact = true; if (NetworkServer.active) { GlobalEventManager.instance.OnHitAll(damageInfo, collider.gameObject); } } }
// Token: 0x06001EB6 RID: 7862 RVA: 0x00090FD8 File Offset: 0x0008F1D8 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!this.victim) { bool flag = false; this.NetworkhitHurtboxIndex = -1; HurtBox component = impactInfo.collider.GetComponent <HurtBox>(); GameObject gameObject = null; if (component) { flag = true; HealthComponent healthComponent = component.healthComponent; if (healthComponent) { gameObject = healthComponent.gameObject; } this.NetworkhitHurtboxIndex = (sbyte)component.indexInGroup; } if (!gameObject && !this.ignoreWorld) { gameObject = impactInfo.collider.gameObject; this.NetworkhitHurtboxIndex = -2; } if (gameObject == this.projectileController.owner) { this.victim = null; this.NetworkhitHurtboxIndex = -1; return; } if (this.ignoreCharacters && flag) { gameObject = null; this.NetworkhitHurtboxIndex = -1; } if (gameObject) { this.stickEvent.Invoke(); ParticleSystem[] array = this.stickParticleSystem; for (int i = 0; i < array.Length; i++) { array[i].Play(); } if (this.stickSoundString.Length > 0) { Util.PlaySound(this.stickSoundString, base.gameObject); } } Vector3 estimatedImpactNormal = impactInfo.estimatedImpactNormal; if (estimatedImpactNormal != Vector3.zero) { base.transform.rotation = Util.QuaternionSafeLookRotation(estimatedImpactNormal, base.transform.up); } Transform transform = impactInfo.collider.transform; this.NetworklocalPosition = transform.InverseTransformPoint(base.transform.position); this.NetworklocalRotation = Quaternion.Inverse(transform.rotation) * base.transform.rotation; this.victim = gameObject; } }
// Token: 0x06001E42 RID: 7746 RVA: 0x0008E825 File Offset: 0x0008CA25 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { ProjectileImpactEvent projectileImpactEvent = this.impactEvent; if (projectileImpactEvent == null) { return; } projectileImpactEvent.Invoke(impactInfo); }
// Token: 0x06001E54 RID: 7764 RVA: 0x0008F095 File Offset: 0x0008D295 void IProjectileImpactBehavior.OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (this.consumed) { return; } this.consumed = true; this.CreateWalkers(); UnityEngine.Object.Destroy(base.gameObject); }
// Token: 0x06001DEB RID: 7659 RVA: 0x0008CA74 File Offset: 0x0008AC74 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { EffectManager.instance.SimpleImpactEffect(this.impactSpark, impactInfo.estimatedPointOfImpact, -base.transform.forward, true); if (this.hookState != HookProjectileImpact.HookState.Flying) { return; } HurtBox component = impactInfo.collider.GetComponent <HurtBox>(); if (component) { HealthComponent healthComponent = component.healthComponent; if (healthComponent) { TeamComponent component2 = healthComponent.GetComponent <TeamComponent>(); TeamFilter component3 = base.GetComponent <TeamFilter>(); if (healthComponent.gameObject == this.projectileController.owner || component2.teamIndex == component3.teamIndex) { return; } this.Networkvictim = healthComponent.gameObject; this.victimSetStateOnHurt = this.victim.GetComponent <SetStateOnHurt>(); if (this.victimSetStateOnHurt) { this.victimSetStateOnHurt.SetPain(); } DamageInfo damageInfo = new DamageInfo(); if (this.projectileDamage) { damageInfo.damage = this.projectileDamage.damage; damageInfo.crit = this.projectileDamage.crit; damageInfo.attacker = (this.projectileController.owner ? this.projectileController.owner.gameObject : null); damageInfo.inflictor = base.gameObject; damageInfo.position = impactInfo.estimatedPointOfImpact; damageInfo.force = this.projectileDamage.force * base.transform.forward; damageInfo.procChainMask = this.projectileController.procChainMask; damageInfo.procCoefficient = this.projectileController.procCoefficient; damageInfo.damageColorIndex = this.projectileDamage.damageColorIndex; } else { Debug.Log("No projectile damage component!"); } Debug.Log(damageInfo.damage); healthComponent.TakeDamage(damageInfo); GlobalEventManager.instance.OnHitEnemy(damageInfo, healthComponent.gameObject); this.NetworkhookState = HookProjectileImpact.HookState.HitDelay; EffectManager.instance.SimpleImpactEffect(this.impactSuccess, impactInfo.estimatedPointOfImpact, -base.transform.forward, true); } } if (!this.victim) { this.NetworkhookState = HookProjectileImpact.HookState.ReelFail; } }
public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!this.canHitWorld) { return; } if (this.NetworkboomerangState != 2) { this.stopwatch = 0f; this.NetworkboomerangState = 2; this.OnFlyBack(); } EffectManager.SimpleImpactEffect(this.impactSpark, impactInfo.estimatedPointOfImpact, -base.transform.forward, true); }
// Token: 0x06001E0D RID: 7693 RVA: 0x000815A4 File Offset: 0x0007F7A4 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { HurtBox component = impactInfo.collider.GetComponent <HurtBox>(); if (component) { HealthComponent healthComponent = component.healthComponent; if (healthComponent) { if (!this.canHitCharacters) { return; } TeamComponent component2 = healthComponent.GetComponent <TeamComponent>(); TeamFilter component3 = base.GetComponent <TeamFilter>(); if (healthComponent.gameObject == this.projectileController.owner || component2.teamIndex == component3.teamIndex) { return; } GameObject gameObject = healthComponent.gameObject; DamageInfo damageInfo = new DamageInfo(); if (this.projectileDamage) { damageInfo.damage = this.projectileDamage.damage * this.damageCoefficient; damageInfo.crit = this.projectileDamage.crit; damageInfo.attacker = (this.projectileController.owner ? this.projectileController.owner.gameObject : null); damageInfo.inflictor = base.gameObject; damageInfo.position = impactInfo.estimatedPointOfImpact; damageInfo.force = this.projectileDamage.force * base.transform.forward; damageInfo.procChainMask = this.projectileController.procChainMask; damageInfo.procCoefficient = this.projectileController.procCoefficient; damageInfo.damageColorIndex = this.projectileDamage.damageColorIndex; damageInfo.damageType = this.projectileDamage.damageType; } healthComponent.TakeDamage(damageInfo); GlobalEventManager.instance.OnHitEnemy(damageInfo, healthComponent.gameObject); this.NetworkboomerangState = BoomerangProjectile.BoomerangState.FlyBack; } } if (!this.canHitWorld) { return; } this.NetworkboomerangState = BoomerangProjectile.BoomerangState.FlyBack; EffectManager.SimpleImpactEffect(this.impactSpark, impactInfo.estimatedPointOfImpact, -base.transform.forward, true); }
// Token: 0x06001E11 RID: 7697 RVA: 0x0008DA18 File Offset: 0x0008BC18 public void OnCollisionEnter(Collision collision) { if (NetworkServer.active || this.isPrediction) { ContactPoint[] contacts = collision.contacts; ProjectileImpactInfo impactInfo = new ProjectileImpactInfo { collider = collision.collider, estimatedPointOfImpact = ProjectileController.EstimateContactPoint(contacts, collision.collider), estimatedImpactNormal = ProjectileController.EstimateContactNormal(contacts) }; IProjectileImpactBehavior[] components = base.GetComponents <IProjectileImpactBehavior>(); for (int i = 0; i < components.Length; i++) { components[i].OnProjectileImpact(impactInfo); } } }
// Token: 0x06001E78 RID: 7800 RVA: 0x0000409B File Offset: 0x0000229B public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { }
// Token: 0x06001F21 RID: 7969 RVA: 0x00087164 File Offset: 0x00085364 public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!this.alive) { return; } Collider collider = impactInfo.collider; if (collider) { DamageInfo damageInfo = new DamageInfo(); if (this.projectileDamage) { damageInfo.damage = this.projectileDamage.damage; damageInfo.crit = this.projectileDamage.crit; damageInfo.attacker = (this.projectileController.owner ? this.projectileController.owner.gameObject : null); damageInfo.inflictor = base.gameObject; damageInfo.position = impactInfo.estimatedPointOfImpact; damageInfo.force = this.projectileDamage.force * base.transform.forward; damageInfo.procChainMask = this.projectileController.procChainMask; damageInfo.procCoefficient = this.projectileController.procCoefficient; damageInfo.damageColorIndex = this.projectileDamage.damageColorIndex; damageInfo.damageType = this.projectileDamage.damageType; } else { Debug.Log("No projectile damage component!"); } HurtBox component = collider.GetComponent <HurtBox>(); if (component) { HealthComponent healthComponent = component.healthComponent; if (healthComponent) { if (healthComponent.gameObject == this.projectileController.owner) { return; } TeamComponent component2 = healthComponent.GetComponent <TeamComponent>(); TeamFilter component3 = base.GetComponent <TeamFilter>(); bool flag = false; if (component2 && component3) { flag = (component2.teamIndex == component3.teamIndex); } if (!flag) { Util.PlaySound(this.enemyHitSoundString, base.gameObject); if (NetworkServer.active) { damageInfo.ModifyDamageInfo(component.damageModifier); healthComponent.TakeDamage(damageInfo); GlobalEventManager.instance.OnHitEnemy(damageInfo, component.healthComponent.gameObject); } } this.alive = false; } } else if (this.destroyOnWorld) { this.alive = false; } damageInfo.position = base.transform.position; if (NetworkServer.active) { GlobalEventManager.instance.OnHitAll(damageInfo, collider.gameObject); } } if (!this.alive) { if (NetworkServer.active && this.impactEffect) { EffectManager.SimpleImpactEffect(this.impactEffect, impactInfo.estimatedPointOfImpact, -base.transform.forward, !this.projectileController.isPrediction); } Util.PlaySound(this.hitSoundString, base.gameObject); if (this.destroyWhenNotAlive) { UnityEngine.Object.Destroy(base.gameObject); } } }