Implemented Target Dummy with Getting Shot Functionality
This commit is contained in:
parent
dbf5b10953
commit
559977e0cf
@ -9,12 +9,8 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="6cf170ec-fe5f-4f16-8266-5314a48c37cf" name="Changes" comment="">
|
<list default="true" id="6cf170ec-fe5f-4f16-8266-5314a48c37cf" name="Changes" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/Combat/BP_CombatWorkbench.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/Combat/BP_CombatWorkbench.uasset" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/GunRangeMechanics/Target/BP_Target.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/GunRangeMechanics/Target/BP_Target.uasset" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/Recon/BP_ReconWorkbench.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/Recon/BP_ReconWorkbench.uasset" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -128,7 +124,7 @@
|
|||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1705107034728</updated>
|
<updated>1705107034728</updated>
|
||||||
<workItem from="1705107037693" duration="1156000" />
|
<workItem from="1705107037693" duration="2444000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:bcbd04ff5a9706023358d5ab845dfb2dacc9bddaac778844750dabd821878a8f
|
oid sha256:9f3acba0c9e6d6625b93b61cfe439b686c61293c2ecbe7572a0a3c606ee4dfe4
|
||||||
size 27651
|
size 63784
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:80223e45e684837efa4a66de2e409345e8c3057ef1d734acb2475fd2184d080a
|
oid sha256:a1a53464c35266216d4a8cdc127a908d9c74e93515e846e2c5324247048be12e
|
||||||
size 238358
|
size 240946
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "TargetDummy.h"
|
||||||
|
|
||||||
|
// Sets default values
|
||||||
|
ATargetDummy::ATargetDummy()
|
||||||
|
{
|
||||||
|
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
void ATargetDummy::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called every frame
|
||||||
|
void ATargetDummy::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Actor.h"
|
||||||
|
#include "TargetDummy.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class ENDLESSVENDETTA_API ATargetDummy : public AActor
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Sets default values for this actor's properties
|
||||||
|
ATargetDummy();
|
||||||
|
|
||||||
|
// Called every frame
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void TargetShot();
|
||||||
|
|
||||||
|
};
|
@ -12,6 +12,8 @@
|
|||||||
#include "EndlessVendetta/AI/EnemyCharacter.h"
|
#include "EndlessVendetta/AI/EnemyCharacter.h"
|
||||||
#include <EndlessVendetta/EndlessVendettaGameMode.h>
|
#include <EndlessVendetta/EndlessVendettaGameMode.h>
|
||||||
|
|
||||||
|
#include "EndlessVendetta/BountySystem/ControlsTraining/TargetDummy.h"
|
||||||
|
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
ABaseWeaponClass::ABaseWeaponClass()
|
ABaseWeaponClass::ABaseWeaponClass()
|
||||||
@ -192,6 +194,7 @@ void ABaseWeaponClass::Fire()
|
|||||||
{
|
{
|
||||||
tempWeaponDamage = WeaponDamage;
|
tempWeaponDamage = WeaponDamage;
|
||||||
}
|
}
|
||||||
|
if (ATargetDummy* TargetDummy = Cast<ATargetDummy>(outHit.GetActor())) TargetDummy->TargetShot();
|
||||||
if (!Cast<AAICharacter>(outHit.GetActor())) return;
|
if (!Cast<AAICharacter>(outHit.GetActor())) return;
|
||||||
Cast<AAICharacter>(outHit.GetActor())->TakeDamage(tempWeaponDamage, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
Cast<AAICharacter>(outHit.GetActor())->TakeDamage(tempWeaponDamage, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user