70 lines
1.5 KiB
C++
70 lines
1.5 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "../Public/MyCharacter.h"
|
|
#include "Components/SplineComponent.h"
|
|
#include "Components/SplineMeshComponent.h"
|
|
#include "SceneManagement.h"
|
|
|
|
#include "WaterBall.generated.h"
|
|
|
|
class ASeedCarousel;
|
|
|
|
UCLASS()
|
|
class PROJECTELERI_API AWaterBall : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// Sets default values for this actor's properties
|
|
AWaterBall();
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
UPROPERTY(BlueprintReadOnly)
|
|
UStaticMeshComponent* HighlightBox;
|
|
|
|
UPROPERTY()
|
|
APlayerCameraManager* PlayerCameraManager;
|
|
|
|
UPROPERTY()
|
|
FVector LaunchVelocity;
|
|
|
|
public:
|
|
UPROPERTY(BlueprintReadWrite)
|
|
AMyCharacter* PlayerCharacter;
|
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
|
UStaticMesh* HighlightBoxMesh;
|
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
|
UMaterialInstance* HighlightBoxMaterial;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
bool bThrowing;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
bool bAbleToThrow;
|
|
|
|
// Called every frame
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
|
void BeginAnimating();
|
|
|
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
|
void EndAnimating();
|
|
|
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
|
void ThrowBall();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
FVector GetLaunchVelocity() { return LaunchVelocity; }
|
|
|
|
};
|