VRCharacterBase.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2. #pragma once
  3. #include "CoreMinimal.h"
  4. #include "GameFramework/Character.h"
  5. #include "Camera/CameraComponent.h"
  6. #include "Components/TimelineComponent.h"
  7. #include "VRGroupBase.h"
  8. #include "VRCharacterBase.generated.h"
  9. UCLASS()
  10. class TETREESEDEMO_API AVRCharacterBase : public ACharacter
  11. {
  12. GENERATED_BODY()
  13. public:
  14. // Sets default values for this character's properties
  15. AVRCharacterBase(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
  16. protected:
  17. // Called when the game starts or when spawned
  18. virtual void BeginPlay() override;
  19. public:
  20. // Called every frame
  21. virtual void Tick(float DeltaTime) override;
  22. // Called to bind functionality to input
  23. virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  24. private:
  25. void MoveForward(float value);
  26. void MoveRight(float value);
  27. void Turn(float value);
  28. void LookUp(float value);
  29. void BeginWaitConnected();
  30. void CreateGroup();
  31. bool IsInGroup();
  32. void Test();
  33. private:
  34. UPROPERTY(Category = Component, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
  35. UCameraComponent* FirstPersonCamera;
  36. UPROPERTY(EditAnywhere)
  37. TSubclassOf<AVRGroupBase> GroupClass;
  38. FTimeline BeginWaitConnected_Timeline;
  39. UPROPERTY()
  40. UCurveFloat* CurveFloat;
  41. UFUNCTION()
  42. void OnBeginWaitConnected_TimelineUpdate(float value);
  43. UFUNCTION()
  44. void OnBeginWaitConnected_TimelineFinished();
  45. };