created new NPC c++ class
This commit is contained in:
parent
a5540f5bbc
commit
ba74f12c4f
@ -1,32 +1,32 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "HYEnemy.h"
|
||||
#include "HYEnemyBase.h"
|
||||
|
||||
// Sets default values
|
||||
AHYEnemy::AHYEnemy()
|
||||
AHYEnemyBase::AHYEnemyBase()
|
||||
{
|
||||
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||
// Set this character 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 AHYEnemy::BeginPlay()
|
||||
void AHYEnemyBase::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AHYEnemy::Tick(float DeltaTime)
|
||||
void AHYEnemyBase::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
// Called to bind functionality to input
|
||||
void AHYEnemy::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
void AHYEnemyBase::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
{
|
||||
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||
|
@ -3,17 +3,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "HYEnemy.generated.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "HYEnemyBase.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class HWANYOUNG2_API AHYEnemy : public APawn
|
||||
class HWANYOUNG2_API AHYEnemyBase : public ACharacter
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Sets default values for this pawn's properties
|
||||
AHYEnemy();
|
||||
// Sets default values for this character's properties
|
||||
AHYEnemyBase();
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
@ -1,40 +0,0 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "HYWeapon.h"
|
||||
|
||||
// Sets default values
|
||||
AHYWeapon::AHYWeapon()
|
||||
{
|
||||
// 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;
|
||||
|
||||
}
|
||||
|
||||
AHYWeapon::AHYWeapon(float atkDmg, float critDmg, float critRt)
|
||||
{
|
||||
attackDamage = atkDmg;
|
||||
critDamage = critDmg;
|
||||
critRate = critRt;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AHYWeapon::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AHYWeapon::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
void AHYWeapon::UseWeapon(AHYEnemy* target)
|
||||
{
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "HYEnemy.h"
|
||||
#include "HYWeapon.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class HWANYOUNG2_API AHYWeapon : public AActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Sets default values for this actor's properties
|
||||
AHYWeapon();
|
||||
|
||||
AHYWeapon(float atkDmg, float critDmg, float critRt);
|
||||
|
||||
float attackDamage; //flat numbers for attack damage
|
||||
|
||||
float critDamage; //flat numbers for crit damage
|
||||
|
||||
float critRate; //percentage rate of how likely one hits a crit dmg
|
||||
|
||||
|
||||
|
||||
/* smth to think about in later epics:
|
||||
* hit stop - this is more an event+animation frame related thing
|
||||
* knock back - this is more of status effect stuff
|
||||
*/
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
/*
|
||||
*/
|
||||
virtual void UseWeapon(AHYEnemy* target);
|
||||
};
|
@ -16,11 +16,11 @@ class Ahwanyoung2Character : public ACharacter
|
||||
GENERATED_BODY()
|
||||
|
||||
/** Camera boom positioning the camera behind the character */
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
||||
UPROPERTY(BlueprintReadWrite, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
||||
class USpringArmComponent* CameraBoom;
|
||||
|
||||
/** Follow camera */
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
||||
UPROPERTY(BlueprintReadWrite, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
||||
class UCameraComponent* FollowCamera;
|
||||
|
||||
/** Collection sphere */
|
||||
|
Loading…
Reference in New Issue
Block a user