Unreal Snake Game 1.0.0
SG_Pawn.h
1// Snake Game, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Pawn.h"
7#include "Core/Types.h"
8#include "SG_Pawn.generated.h"
9
10class UCameraComponent;
11
12UCLASS()
13class SNAKEGAME_API ASG_Pawn : public APawn
14{
15 GENERATED_BODY()
16
17public:
18 ASG_Pawn();
19
26 void UpdateLocation(const SnakeGame::Dim& Dim, int32 CellSize, const FTransform& GridOrigin);
27
28protected:
29 UPROPERTY(VisibleAnywhere)
30 USceneComponent* Origin;
31
32 UPROPERTY(VisibleAnywhere)
33 UCameraComponent* Camera;
34
35private:
37 int32 CellSize;
38 FTransform GridOrigin;
39 FDelegateHandle ResizeHandle;
40
41 void OnViewportResized(FViewport* Viewport, uint32 Val);
42};
Definition: SG_Pawn.h:14
Definition: Types.h:12