81 lines
2.2 KiB
C++
81 lines
2.2 KiB
C++
// Copyright Sorcerers Shenanigans Central. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/PlayerController.h"
|
|
#include "LumiCharacter.h"
|
|
|
|
#include "LumiController.generated.h"
|
|
|
|
class UInputMappingContext;
|
|
class UInputAction;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class WIZARDINGCENTRAL_API ALumiController : public APlayerController
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY()
|
|
UEnhancedInputComponent* EnhancedInputComponent;
|
|
|
|
UPROPERTY()
|
|
ALumiCharacter* LumiCharacter = nullptr;
|
|
|
|
public:
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput")
|
|
TObjectPtr<UInputMappingContext> InputMappingContext;
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput")
|
|
int32 MappingPriority = 0;
|
|
|
|
/** Grab Input Action */
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Character Movement")
|
|
TObjectPtr<UInputAction> GrabAction = nullptr;
|
|
/** Jump Input Action */
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Character Movement")
|
|
TObjectPtr<UInputAction> JumpAction = nullptr;
|
|
/** Move Input Action */
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Character Movement")
|
|
TObjectPtr<UInputAction> MoveAction = nullptr;
|
|
/** Look Input Action */
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Character Movement")
|
|
TObjectPtr<UInputAction> LookAction = nullptr;
|
|
/** Spell Input Action */
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Spell System")
|
|
TObjectPtr<UInputAction> SpellAction = nullptr;
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Spell System")
|
|
TObjectPtr<UInputAction> SpellPositionAction = nullptr;
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "PlayerInput|Spell System")
|
|
TObjectPtr<UInputAction> SpellTrainSwitchAction = nullptr;
|
|
|
|
void
|
|
ShowMouseCursor();
|
|
|
|
void
|
|
HideMouseCursor();
|
|
|
|
void
|
|
GetLumiCharacter(ALumiCharacter*& OutLumiCharacter) const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "LumiController")
|
|
ALumiCharacter*
|
|
GetLumiCharacter() const;
|
|
|
|
protected:
|
|
virtual void
|
|
OnPossess(APawn* InPawn) override;
|
|
|
|
virtual void
|
|
OnUnPossess() override;
|
|
|
|
private:
|
|
void
|
|
OnSpellActionStarted();
|
|
|
|
void
|
|
OnSpellActionCompleted();
|
|
};
|