Cleaned up scripts
This commit is contained in:
parent
38ab588226
commit
ba713ddb2e
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e80b44e582d11e6ad42033c0a1a16231f6301999bae071ebfb5b4e873f21d127
|
||||
size 22069
|
||||
oid sha256:ac2b6ffc86b65fe30fcc0358b8b0242d0b1aa0a2bf21b45f1c2030edc1383f4b
|
||||
size 25526
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8754e6b425965184b0956fcfe7ebd1699d6733f6f44a1351ad6b9a44896afea0
|
||||
oid sha256:f8ddf56cb9911f76fc53b56bce7f4d9b975536954fcca5b0645c7617b07deaed
|
||||
size 23754
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include "MerchantTriggerBox.h"
|
||||
|
||||
#include "the_twilight_abyss/PlayerTemp/TempCharacter.h"
|
||||
|
||||
//makes it so the component script is initialized when game starts
|
||||
UMerchantTriggerBox::UMerchantTriggerBox()
|
||||
{
|
||||
@ -17,6 +19,7 @@ void UMerchantTriggerBox::BeginPlay()
|
||||
UE_LOG(LogTemp, Warning, TEXT("TRIGGER SPAWNED"));
|
||||
}
|
||||
|
||||
|
||||
void UMerchantTriggerBox::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
|
||||
{
|
||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||
@ -24,16 +27,6 @@ void UMerchantTriggerBox::TickComponent(float DeltaTime, ELevelTick TickType, FA
|
||||
|
||||
}
|
||||
|
||||
void UMerchantTriggerBox::PlayerCheck()
|
||||
{
|
||||
/*
|
||||
TODO:
|
||||
UNCOMMENT THE UPRIMITECOMPONENT OUT
|
||||
FILL OUT THE COMPONENTOVERLAP FUNCTION SO IT DISPLAYS THE PLAYERS NAME WHEN THEY ENTER IT
|
||||
*/
|
||||
|
||||
//UPrimitiveComponent TriggerOverlap = BeginComponentOverlap();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -20,8 +20,4 @@ protected:
|
||||
public:
|
||||
UMerchantTriggerBox();
|
||||
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
|
||||
|
||||
private:
|
||||
void PlayerCheck();
|
||||
|
||||
};
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include "TempCharacter.h"
|
||||
|
||||
#include "../../../Plugins/Developer/RiderLink/Source/RD/thirdparty/clsocket/src/ActiveSocket.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
|
||||
|
||||
// Sets default values
|
||||
// CONSTRUCTOR
|
||||
ATempCharacter::ATempCharacter()
|
||||
{
|
||||
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||
@ -20,17 +21,20 @@ void ATempCharacter::BeginPlay()
|
||||
|
||||
}
|
||||
|
||||
//Binds the input we made in the setup player component to the forward vector
|
||||
void ATempCharacter::ForwardInput(float Axis)
|
||||
{
|
||||
AddMovementInput(GetActorForwardVector()* Axis);
|
||||
|
||||
}
|
||||
|
||||
//Binds the input we made in the setup player component to the right vector
|
||||
void ATempCharacter::RightMoveInput(float Axis)
|
||||
{
|
||||
AddMovementInput(GetActorRightVector()* Axis);
|
||||
}
|
||||
|
||||
|
||||
// Called every frame
|
||||
void ATempCharacter::Tick(float DeltaTime)
|
||||
{
|
||||
@ -45,7 +49,7 @@ void ATempCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCompo
|
||||
PlayerInputComponent->BindAxis(TEXT("Move Right / Left"), this, &ATempCharacter::RightMoveInput);
|
||||
PlayerInputComponent->BindAxis(TEXT("Turn Right / Left Mouse"), this, &ATempCharacter::AddControllerYawInput);
|
||||
PlayerInputComponent->BindAxis(TEXT("Look Up / Down Mouse"), this, &ATempCharacter::AddControllerPitchInput);
|
||||
PlayerInputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed);
|
||||
PlayerInputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed); // custom keybind Interact
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/BoxComponent.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "TempCharacter.generated.h"
|
||||
|
||||
@ -28,6 +29,7 @@ public:
|
||||
|
||||
// Called to bind functionality to input
|
||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||
|
||||
void KeyPressed(FKey Interact);
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user