Head Mounted VR 2.5
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). More...
 
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). More...
 
virtual void WeaponLocOverlapEnd (class UPrimitiveComponent *OverlappedComp, class AActor *OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 
virtual void Fire ()
 True if not empty More...
 
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. More...
 
void SetTriggerPushInt (float Int)
 Sets trigger push intensivity for the animation More...
 
void SetHammer_X (float Int)
 Sets Hamer push intensivity for the animation. More...
 
void SetJustShot (bool JustShoot)
 Sets bJustShot for the animation. More...
 
void SpawnDecal (FHitResult HitResult)
 
void SetSaferPressed (bool Status)
 Sets bSaferPressed for the animation. More...
 
FORCEINLINE bool GetInHandStatus () const
 Returns true if player is holding a gun. More...
 
FORCEINLINE bool GetJustDroped () const
 Returns JustDroped status. More...
 
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 void Tick (float DeltaTime) override
 
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 More...
 
bool IsColliding ()
 
void Drop (class UVR_HandComponent *MotionController)
 Stop object interaction More...
 
void Shoot ()
 
bool IsHeldBy (class UVR_HandComponent *MotionController)
 Indetify if object is held by MotionController More...
 
bool CanNonVRInteract ()
 
bool ForceCheckForGrabComponents ()
 
void NonVRInteraction (AVR_Player *Player)
 
bool IsNonVRInteractTillStop ()
 
void Stop_NonVRInteraction (AVR_Player *Player)
 Stop object interaction More...
 

Public Attributes

class UVR_GrabComponentGrabComponent
 
class UVR_WeaponAnimationInstanceWeaponAnimation
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void BeginPlay () override
 

Protected Attributes

class UStaticMesh * Weapon_Icon_Mesh
 
uint8 CurrentCaliber
 Caliber More...
 
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
 
UParticleSystem * MuzzleParticle
 
UParticleSystem * SmokeParticle
 
float Damage
 
UParticleSystem * ImpactParticle
 
UParticleSystemComponent * LMuzzleParticle
 Particle Components to spawn. More...
 
UParticleSystemComponent * LSmokeParticle
 
UParticleSystemComponent * CImpactParticle
 
FTransform PrevTransform
 
bool bLatsBulletShot
 
UParticleSystem * DefaultParticle
 Impact particles More...
 
UParticleSystem * DirtParticle
 
UParticleSystem * RockParticle
 
UParticleSystem * SandParticle
 
UParticleSystem * WaterParticle
 
UParticleSystem * GlassParticle
 
UParticleSystem * ClothParticle
 
UParticleSystem * MetalParticle
 
UParticleSystem * WoodParticle
 
UParticleSystem * GrassParticle
 
UParticleSystem * CarpetParticle
 
UParticleSystem * ConcreteParticle
 
UParticleSystem * SnowParticle
 
UParticleSystem * TileParticle
 
UParticleSystem * AsphaltParticle
 
UParticleSystem * BrickParticle
 
UParticleSystem * CardboardParticle
 
UParticleSystem * ClayParticle
 
UParticleSystem * PlasticParticle
 
UParticleSystem * ElectronicsParticle
 
UParticleSystem * SheetRockParticle
 
UParticleSystem * PlasterParticle
 
UParticleSystem * LeavesParticle
 
UParticleSystem * 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

UParticleSystem* 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

UParticleSystem* AVR_Weapon::BloodParticle
protected

◆ BrickParticle

UParticleSystem* AVR_Weapon::BrickParticle
protected

◆ bSaferPressed

bool AVR_Weapon::bSaferPressed
protected

◆ bShootAnim

bool AVR_Weapon::bShootAnim
protected

◆ CardboardParticle

UParticleSystem* AVR_Weapon::CardboardParticle
protected

◆ CarpetParticle

UParticleSystem* AVR_Weapon::CarpetParticle
protected

◆ CImpactParticle

UParticleSystemComponent* AVR_Weapon::CImpactParticle
protected

◆ ClayParticle

UParticleSystem* AVR_Weapon::ClayParticle
protected

◆ ClothParticle

UParticleSystem* AVR_Weapon::ClothParticle
protected

◆ ConcreteParticle

UParticleSystem* AVR_Weapon::ConcreteParticle
protected

◆ CurrentCaliber

uint8 AVR_Weapon::CurrentCaliber
protected

Caliber

◆ CurrentMag

AActor* AVR_Weapon::CurrentMag
protected

◆ Damage

float AVR_Weapon::Damage
protected

◆ DefaultParticle

UParticleSystem* AVR_Weapon::DefaultParticle
protected

Impact particles

◆ DirtParticle

UParticleSystem* AVR_Weapon::DirtParticle
protected

◆ ElectronicsParticle

UParticleSystem* 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

UParticleSystem* AVR_Weapon::GlassParticle
protected

◆ GrabComponent

class UVR_GrabComponent* AVR_Weapon::GrabComponent

◆ GrassParticle

UParticleSystem* AVR_Weapon::GrassParticle
protected

◆ ImpactParticle

UParticleSystem* AVR_Weapon::ImpactParticle
protected

◆ LeavesParticle

UParticleSystem* AVR_Weapon::LeavesParticle
protected

◆ LMuzzleParticle

UParticleSystemComponent* AVR_Weapon::LMuzzleParticle
protected

Particle Components to spawn.

◆ LSmokeParticle

UParticleSystemComponent* AVR_Weapon::LSmokeParticle
protected

◆ MagAttachTo_Mesh

class UPrimitiveComponent* AVR_Weapon::MagAttachTo_Mesh
protected

◆ MetalParticle

UParticleSystem* AVR_Weapon::MetalParticle
protected

◆ MuzzleParticle

UParticleSystem* 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

UParticleSystem* AVR_Weapon::PlasterParticle
protected

◆ PlasticParticle

UParticleSystem* AVR_Weapon::PlasticParticle
protected

◆ PrevTransform

FTransform AVR_Weapon::PrevTransform
protected

◆ ProjectileClass

TSubclassOf<class AVR_WeaponProjectile> AVR_Weapon::ProjectileClass
protected

Projectile class to spawn

◆ RockParticle

UParticleSystem* AVR_Weapon::RockParticle
protected

◆ SandParticle

UParticleSystem* AVR_Weapon::SandParticle
protected

◆ SheetRockParticle

UParticleSystem* AVR_Weapon::SheetRockParticle
protected

◆ SmokeParticle

UParticleSystem* AVR_Weapon::SmokeParticle
protected

◆ SnowParticle

UParticleSystem* AVR_Weapon::SnowParticle
protected

◆ TileParticle

UParticleSystem* AVR_Weapon::TileParticle
protected

◆ VR_BulletDecalClass

TSubclassOf<class AVR_BulletDecal> AVR_Weapon::VR_BulletDecalClass
protected

Decal class to spawn

◆ WaterParticle

UParticleSystem* AVR_Weapon::WaterParticle
protected

◆ Weapon_Icon_Mesh

class UStaticMesh* AVR_Weapon::Weapon_Icon_Mesh
protected

◆ WeaponAnimation

class UVR_WeaponAnimationInstance* AVR_Weapon::WeaponAnimation

◆ WoodParticle

UParticleSystem* AVR_Weapon::WoodParticle
protected

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