// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) VRMADA, All rights reserved.
//
// --------------------------------------------------------------------------------------------------------------------
using System;
using UnityEngine;
namespace UltimateXR.Mechanics.Weapons
{
///
/// Projectile deflection event parameters.
///
public class UxrDeflectEventArgs : EventArgs
{
#region Public Types & Data
///
/// Gets the projectile source.
///
public UxrProjectileSource ProjectileSource { get; }
///
/// Gets the raycast that was used to detect the collision.
///
public RaycastHit RaycastHit { get; }
///
/// Gets the new projectile direction after being deflected.
///
public Vector3 NewDirection { get; }
#endregion
#region Constructors & Finalizer
///
/// Constructor.
///
/// The projectile source
/// The raycast used to detect projectile collision
/// The new, deflected, projectile direction
public UxrDeflectEventArgs(UxrProjectileSource projectileSource, RaycastHit raycastHit, Vector3 newDirection)
{
ProjectileSource = projectileSource;
RaycastHit = raycastHit;
NewDirection = newDirection;
}
#endregion
}
}