Head Mounted VR 3.0
Loading...
Searching...
No Matches
AVR_Weapon Class Reference

Weapon class. More...

#include <VR_Weapon.h>

+ Inheritance diagram for AVR_Weapon:

Public Member Functions

 AVR_Weapon ()
 
void MagLocOverlapBegin (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 Mag overlaps hand begin (if mag overlaping, need for reload).
 
virtual void MagLocOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 Mag overlaps hand end (if mag stop overlaping, need for reload).
 
virtual void WeaponLocOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 
virtual void Fire ()
 True if not empty.
 
void DoAfterFire (bool IsTraceHit, FHitResult OutTraceHit)
 
void DoAfterEmptyShoot ()
 
virtual void ReleaseMag ()
 
void DoOnReleaseMag ()
 
void DoOnMagIn ()
 
virtual void UpdateAnimation ()
 
void SetCaliber (uint8 Caliber)
 
void RunJustDropTimer ()
 To know when player can put gun to the inventory.
 
void SetTriggerPushInt (float Int)
 Sets trigger push intensivity for the animation.
 
void SetHammer_X (float Int)
 Sets Hamer push intensivity for the animation.
 
void SetJustShot (bool JustShoot)
 Sets bJustShot for the animation.
 
void SpawnDecal (FHitResult HitResult)
 
void SetSaferPressed (bool Status)
 Sets bSaferPressed for the animation.
 
FORCEINLINE bool GetInHandStatus () const
 Returns true if player is holding a gun.
 
FORCEINLINE bool GetJustDroped () const
 Returns JustDroped status.
 
FORCEINLINE class USkeletalMeshComponent * GetWeaponMesh () const
 
FORCEINLINE class UBoxComponent * GetMagBox () const
 
FORCEINLINE class UPrimitiveComponent * GetMagAttachToMesh () const
 
FORCEINLINE float GetTriggerPushInt () const
 
FORCEINLINE float GetHammer_X () const
 
FORCEINLINE bool GetJustShot () const
 
FORCEINLINE bool GetSaferPressed () const
 
FORCEINLINE uint8 GetCaliber () const
 
FORCEINLINE UStaticMesh * GetStaticWeaponMesh () const
 
FORCEINLINE AActor * GetCurrentMag () const
 
FORCEINLINE float GetDamage () const
 
virtual void A_Press ()
 
void Do_On_A_Press ()
 
virtual void B_Press ()
 
void Do_On_B_Press ()
 
void OnHit (UPrimitiveComponent *HitComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, FVector normalImpulse, const FHitResult &Hit)
 
virtual void Tick (float DeltaTime) override
 
- Public Member Functions inherited from AVR_Actor
 AVR_Actor ()
 
virtual bool IsColliding_Implementation ()
 
void OnHitCheckColliding (UPrimitiveComponent *HitComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, FVector normalImpulse, const FHitResult &Hit)
 
- Public Member Functions inherited from IVR_InteractionInterface
bool IsGrabbed ()
 
bool CanPullGrab ()
 
void Grab (class UVR_HandComponent *MotionController, bool &HandleStatus, bool bFroceAttachHandle)
 Used for interaction with objects such as door.
 
bool IsColliding ()
 
void Drop (class UVR_HandComponent *MotionController)
 Stop object interaction.
 
void Shoot ()
 
bool IsHeldBy (class UVR_HandComponent *MotionController)
 Indetify if object is held by MotionController.
 
bool CanNonVRInteract ()
 
bool ForceCheckForGrabComponents ()
 
void NonVRInteraction (AVR_Player *Player)
 
bool IsNonVRInteractTillStop ()
 
void Stop_NonVRInteraction (AVR_Player *Player)
 Stop object interaction.
 

Public Attributes

class UVR_GrabComponentGrabComponent
 
class UVR_WeaponAnimationInstanceWeaponAnimation
 

Protected Member Functions

virtual void BeginPlay () override
 
- Protected Member Functions inherited from AVR_Actor

Protected Attributes

class UStaticMesh * Weapon_Icon_Mesh
 
UNiagaraComponent * LMuzzleParticle
 Particle Components to spawn.
 
UNiagaraComponent * LSmokeParticle
 
UNiagaraComponent * CImpactParticle
 
uint8 CurrentCaliber
 Caliber.
 
bool bAmmoApplyed
 
bool bJustShoot
 
bool bShootAnim
 
bool bSaferPressed
 
bool bAmmoLeft
 
bool bAllowAmmoIn
 
float ParticleSize
 
class USoundBase * FireSound
 
class USoundBase * EmptySound
 
class UPrimitiveComponent * MagAttachTo_Mesh
 
AActor * CurrentMag
 
TSubclassOf< class AVR_WeaponProjectileProjectileClass
 
TSubclassOf< class AVR_BulletDecalVR_BulletDecalClass
 
UNiagaraSystem * MuzzleParticle
 
UNiagaraSystem * SmokeParticle
 
float Damage
 
UNiagaraSystem * ImpactParticle
 
FTransform PrevTransform
 
bool bLatsBulletShot
 
UNiagaraSystem * DefaultParticle
 Impact particles.
 
UNiagaraSystem * DirtParticle
 
UNiagaraSystem * RockParticle
 
UNiagaraSystem * SandParticle
 
UNiagaraSystem * WaterParticle
 
UNiagaraSystem * GlassParticle
 
UNiagaraSystem * ClothParticle
 
UNiagaraSystem * MetalParticle
 
UNiagaraSystem * WoodParticle
 
UNiagaraSystem * GrassParticle
 
UNiagaraSystem * CarpetParticle
 
UNiagaraSystem * ConcreteParticle
 
UNiagaraSystem * SnowParticle
 
UNiagaraSystem * TileParticle
 
UNiagaraSystem * AsphaltParticle
 
UNiagaraSystem * BrickParticle
 
UNiagaraSystem * CardboardParticle
 
UNiagaraSystem * ClayParticle
 
UNiagaraSystem * PlasticParticle
 
UNiagaraSystem * ElectronicsParticle
 
UNiagaraSystem * SheetRockParticle
 
UNiagaraSystem * PlasterParticle
 
UNiagaraSystem * LeavesParticle
 
UNiagaraSystem * BloodParticle
 
bool bJustDroped
 
float fTriggerPushInt
 
float fHammer_X
 
class UVR_HandComponentP_MotionControllerMain
 
class UPhysicsConstraintComponent * P_PhysicsConstraintMain
 
class USkeletalMeshComponent * P_HandMeshMain
 
class UVR_HandComponentP_MotionControllerSecond
 
class UPhysicsConstraintComponent * P_PhysicsConstraintSecond
 
class USkeletalMeshComponent * P_HandMeshSecond
 
- Protected Attributes inherited from AVR_Actor
bool bIsColliding = false
 

Detailed Description

Weapon class.

Constructor & Destructor Documentation

◆ AVR_Weapon()

AVR_Weapon::AVR_Weapon ( )

Member Function Documentation

◆ A_Press()

void AVR_Weapon::A_Press ( )
virtual

◆ B_Press()

void AVR_Weapon::B_Press ( )
virtual

◆ BeginPlay()

void AVR_Weapon::BeginPlay ( )
overrideprotectedvirtual

Reimplemented from AVR_Actor.

◆ Do_On_A_Press()

void AVR_Weapon::Do_On_A_Press ( )

◆ Do_On_B_Press()

void AVR_Weapon::Do_On_B_Press ( )

◆ DoAfterEmptyShoot()

void AVR_Weapon::DoAfterEmptyShoot ( )

◆ DoAfterFire()

void AVR_Weapon::DoAfterFire ( bool IsTraceHit,
FHitResult OutTraceHit )

◆ DoOnMagIn()

void AVR_Weapon::DoOnMagIn ( )

◆ DoOnReleaseMag()

void AVR_Weapon::DoOnReleaseMag ( )

◆ Fire()

void AVR_Weapon::Fire ( )
virtual

True if not empty.

◆ GetCaliber()

FORCEINLINE uint8 AVR_Weapon::GetCaliber ( ) const
inline

◆ GetCurrentMag()

FORCEINLINE AActor * AVR_Weapon::GetCurrentMag ( ) const
inline

◆ GetDamage()

FORCEINLINE float AVR_Weapon::GetDamage ( ) const
inline

◆ GetHammer_X()

FORCEINLINE float AVR_Weapon::GetHammer_X ( ) const
inline

◆ GetInHandStatus()

FORCEINLINE bool AVR_Weapon::GetInHandStatus ( ) const
inline

Returns true if player is holding a gun.

Returns
bool bInHand

◆ GetJustDroped()

FORCEINLINE bool AVR_Weapon::GetJustDroped ( ) const
inline

Returns JustDroped status.

Returns
bool bJustDroped

◆ GetJustShot()

FORCEINLINE bool AVR_Weapon::GetJustShot ( ) const
inline

◆ GetMagAttachToMesh()

FORCEINLINE class UPrimitiveComponent * AVR_Weapon::GetMagAttachToMesh ( ) const
inline

◆ GetMagBox()

FORCEINLINE class UBoxComponent * AVR_Weapon::GetMagBox ( ) const
inline

◆ GetSaferPressed()

FORCEINLINE bool AVR_Weapon::GetSaferPressed ( ) const
inline

◆ GetStaticWeaponMesh()

FORCEINLINE UStaticMesh * AVR_Weapon::GetStaticWeaponMesh ( ) const
inline

◆ GetTriggerPushInt()

FORCEINLINE float AVR_Weapon::GetTriggerPushInt ( ) const
inline

◆ GetWeaponMesh()

FORCEINLINE class USkeletalMeshComponent * AVR_Weapon::GetWeaponMesh ( ) const
inline

◆ MagLocOverlapBegin()

void AVR_Weapon::MagLocOverlapBegin ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )

Mag overlaps hand begin (if mag overlaping, need for reload).

◆ MagLocOverlapEnd()

void AVR_Weapon::MagLocOverlapEnd ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )
virtual

Mag overlaps hand end (if mag stop overlaping, need for reload).

◆ OnHit()

void AVR_Weapon::OnHit ( UPrimitiveComponent * HitComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
FVector normalImpulse,
const FHitResult & Hit )

◆ ReleaseMag()

void AVR_Weapon::ReleaseMag ( )
virtual
Parameters
open

◆ RunJustDropTimer()

void AVR_Weapon::RunJustDropTimer ( )

To know when player can put gun to the inventory.

◆ SetCaliber()

void AVR_Weapon::SetCaliber ( uint8 Caliber)
Parameters
Caliber

◆ SetHammer_X()

void AVR_Weapon::SetHammer_X ( float Int)

Sets Hamer push intensivity for the animation.

◆ SetJustShot()

void AVR_Weapon::SetJustShot ( bool JustShoot)

Sets bJustShot for the animation.

◆ SetSaferPressed()

void AVR_Weapon::SetSaferPressed ( bool Status)

Sets bSaferPressed for the animation.

◆ SetTriggerPushInt()

void AVR_Weapon::SetTriggerPushInt ( float Int)

Sets trigger push intensivity for the animation.

◆ SpawnDecal()

void AVR_Weapon::SpawnDecal ( FHitResult HitResult)

◆ Tick()

void AVR_Weapon::Tick ( float DeltaTime)
overridevirtual

Reimplemented from AVR_Actor.

◆ UpdateAnimation()

void AVR_Weapon::UpdateAnimation ( )
virtual

◆ WeaponLocOverlapEnd()

void AVR_Weapon::WeaponLocOverlapEnd ( class UPrimitiveComponent * OverlappedComp,
class AActor * OtherActor,
class UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )
virtual

Member Data Documentation

◆ AsphaltParticle

UNiagaraSystem* AVR_Weapon::AsphaltParticle
protected

◆ bAllowAmmoIn

bool AVR_Weapon::bAllowAmmoIn
protected

◆ bAmmoApplyed

bool AVR_Weapon::bAmmoApplyed
protected

◆ bAmmoLeft

bool AVR_Weapon::bAmmoLeft
protected

◆ bJustDroped

bool AVR_Weapon::bJustDroped
protected

◆ bJustShoot

bool AVR_Weapon::bJustShoot
protected

◆ bLatsBulletShot

bool AVR_Weapon::bLatsBulletShot
protected

◆ BloodParticle

UNiagaraSystem* AVR_Weapon::BloodParticle
protected

◆ BrickParticle

UNiagaraSystem* AVR_Weapon::BrickParticle
protected

◆ bSaferPressed

bool AVR_Weapon::bSaferPressed
protected

◆ bShootAnim

bool AVR_Weapon::bShootAnim
protected

◆ CardboardParticle

UNiagaraSystem* AVR_Weapon::CardboardParticle
protected

◆ CarpetParticle

UNiagaraSystem* AVR_Weapon::CarpetParticle
protected

◆ CImpactParticle

UNiagaraComponent* AVR_Weapon::CImpactParticle
protected

◆ ClayParticle

UNiagaraSystem* AVR_Weapon::ClayParticle
protected

◆ ClothParticle

UNiagaraSystem* AVR_Weapon::ClothParticle
protected

◆ ConcreteParticle

UNiagaraSystem* AVR_Weapon::ConcreteParticle
protected

◆ CurrentCaliber

uint8 AVR_Weapon::CurrentCaliber
protected

Caliber.

◆ CurrentMag

AActor* AVR_Weapon::CurrentMag
protected

◆ Damage

float AVR_Weapon::Damage
protected

◆ DefaultParticle

UNiagaraSystem* AVR_Weapon::DefaultParticle
protected

Impact particles.

◆ DirtParticle

UNiagaraSystem* AVR_Weapon::DirtParticle
protected

◆ ElectronicsParticle

UNiagaraSystem* AVR_Weapon::ElectronicsParticle
protected

◆ EmptySound

class USoundBase* AVR_Weapon::EmptySound
protected

Sound to play each time we fire Empty Gun

◆ fHammer_X

float AVR_Weapon::fHammer_X
protected

◆ FireSound

class USoundBase* AVR_Weapon::FireSound
protected

Sound to play each time we fire

◆ fTriggerPushInt

float AVR_Weapon::fTriggerPushInt
protected

◆ GlassParticle

UNiagaraSystem* AVR_Weapon::GlassParticle
protected

◆ GrabComponent

class UVR_GrabComponent* AVR_Weapon::GrabComponent

◆ GrassParticle

UNiagaraSystem* AVR_Weapon::GrassParticle
protected

◆ ImpactParticle

UNiagaraSystem* AVR_Weapon::ImpactParticle
protected

◆ LeavesParticle

UNiagaraSystem* AVR_Weapon::LeavesParticle
protected

◆ LMuzzleParticle

UNiagaraComponent* AVR_Weapon::LMuzzleParticle
protected

Particle Components to spawn.

◆ LSmokeParticle

UNiagaraComponent* AVR_Weapon::LSmokeParticle
protected

◆ MagAttachTo_Mesh

class UPrimitiveComponent* AVR_Weapon::MagAttachTo_Mesh
protected

◆ MetalParticle

UNiagaraSystem* AVR_Weapon::MetalParticle
protected

◆ MuzzleParticle

UNiagaraSystem* AVR_Weapon::MuzzleParticle
protected

◆ P_HandMeshMain

class USkeletalMeshComponent* AVR_Weapon::P_HandMeshMain
protected

◆ P_HandMeshSecond

class USkeletalMeshComponent* AVR_Weapon::P_HandMeshSecond
protected

◆ P_MotionControllerMain

class UVR_HandComponent* AVR_Weapon::P_MotionControllerMain
protected

◆ P_MotionControllerSecond

class UVR_HandComponent* AVR_Weapon::P_MotionControllerSecond
protected

◆ P_PhysicsConstraintMain

class UPhysicsConstraintComponent* AVR_Weapon::P_PhysicsConstraintMain
protected

◆ P_PhysicsConstraintSecond

class UPhysicsConstraintComponent* AVR_Weapon::P_PhysicsConstraintSecond
protected

◆ ParticleSize

float AVR_Weapon::ParticleSize
protected

◆ PlasterParticle

UNiagaraSystem* AVR_Weapon::PlasterParticle
protected

◆ PlasticParticle

UNiagaraSystem* AVR_Weapon::PlasticParticle
protected

◆ PrevTransform

FTransform AVR_Weapon::PrevTransform
protected

◆ ProjectileClass

TSubclassOf<class AVR_WeaponProjectile> AVR_Weapon::ProjectileClass
protected

Projectile class to spawn

◆ RockParticle

UNiagaraSystem* AVR_Weapon::RockParticle
protected

◆ SandParticle

UNiagaraSystem* AVR_Weapon::SandParticle
protected

◆ SheetRockParticle

UNiagaraSystem* AVR_Weapon::SheetRockParticle
protected

◆ SmokeParticle

UNiagaraSystem* AVR_Weapon::SmokeParticle
protected

◆ SnowParticle

UNiagaraSystem* AVR_Weapon::SnowParticle
protected

◆ TileParticle

UNiagaraSystem* AVR_Weapon::TileParticle
protected

◆ VR_BulletDecalClass

TSubclassOf<class AVR_BulletDecal> AVR_Weapon::VR_BulletDecalClass
protected

Decal class to spawn

◆ WaterParticle

UNiagaraSystem* AVR_Weapon::WaterParticle
protected

◆ Weapon_Icon_Mesh

class UStaticMesh* AVR_Weapon::Weapon_Icon_Mesh
protected

◆ WeaponAnimation

class UVR_WeaponAnimationInstance* AVR_Weapon::WeaponAnimation

◆ WoodParticle

UNiagaraSystem* AVR_Weapon::WoodParticle
protected

The documentation for this class was generated from the following files: