public void SetCharacterOwner(EHGameplayCharacter CharacterOwner) { this.CharacterThatLaunchedProjectile = CharacterOwner; if (HitboxActorComponent) { HitboxActorComponent.SetCharacterOwner(CharacterOwner); } }
/// <summary> /// /// </summary> protected override void CheckForIntersectionWithOtherColliders() { const float BombAngle = 180f; float AngleIncrement = BombAngle / (RayTraceCount - 1); Vector2 BombTransformPosition = this.transform.position; float CurrentAngle = Mathf.Atan2(Physics2D.Velocity.y, Physics2D.Velocity.x) * Mathf.Rad2Deg - 90; EHRayTraceHit RayHit; for (int i = 0; i < RayTraceCount; ++i) { Vector2 OriginPosition = BombTransformPosition + new Vector2(Mathf.Cos(CurrentAngle * Mathf.Deg2Rad) * BombRadius, Mathf.Sin(CurrentAngle * Mathf.Deg2Rad)) * BombRadius; if (CastRayFromVelocity(OriginPosition, out RayHit, 0, true)) { EHGameplayCharacter CharacterThatWeHit = RayHit.HitCollider.GetComponent <EHGameplayCharacter>(); if (CharacterThatWeHit == null || CharacterThatWeHit != CharacterThatLaunchedProjectile) { Explode(); return; } } CurrentAngle += AngleIncrement; } }
public void SetCharacterOwner(EHGameplayCharacter CharacterOwner) { this.CharacterOwner = CharacterOwner; }
private void Awake() { AttackComponent = GetComponent <EHAttackComponent>(); DamageableComponent = GetComponent <EHDamageableComponent>(); CharacterOwner = GetComponent <EHGameplayCharacter>(); }
private void Awake() { CharacterOwner = GetComponent <EHGameplayCharacter>(); }
public void SpawnAtPoint(EHGameplayCharacter CharacterToPlace) { CharacterToPlace.transform.position = this.transform.position; CharacterToPlace.MovementComponent.SetIsFacingLeft(bIsCharacterSpawnedLeft); }