Esempio n. 1
0
 public void SetCharacterOwner(EHGameplayCharacter CharacterOwner)
 {
     this.CharacterThatLaunchedProjectile = CharacterOwner;
     if (HitboxActorComponent)
     {
         HitboxActorComponent.SetCharacterOwner(CharacterOwner);
     }
 }
Esempio n. 2
0
    /// <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;
        }
    }
Esempio n. 3
0
 public void SetCharacterOwner(EHGameplayCharacter CharacterOwner)
 {
     this.CharacterOwner = CharacterOwner;
 }
Esempio n. 4
0
 private void Awake()
 {
     AttackComponent     = GetComponent <EHAttackComponent>();
     DamageableComponent = GetComponent <EHDamageableComponent>();
     CharacterOwner      = GetComponent <EHGameplayCharacter>();
 }
 private void Awake()
 {
     CharacterOwner = GetComponent <EHGameplayCharacter>();
 }
Esempio n. 6
0
 public void SpawnAtPoint(EHGameplayCharacter CharacterToPlace)
 {
     CharacterToPlace.transform.position = this.transform.position;
     CharacterToPlace.MovementComponent.SetIsFacingLeft(bIsCharacterSpawnedLeft);
 }