.. _program_listing_file_Source_GKML_GKMLPawn.h: Program Listing for File GKMLPawn.h =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``Source/GKML/GKMLPawn.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // BSD 3-Clause License Copyright (c) 2022, Pierre Delaunay All rights reserved. #pragma once // Unreal Engine #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "GenericTeamAgentInterface.h" // Generated #include "GKMLPawn.generated.h" UCLASS(Blueprintable, BlueprintType) class GKML_API AGKMLPawn : public APawn, public IGenericTeamAgentInterface { GENERATED_BODY() public: // Sets default values for this pawn's properties AGKMLPawn(); protected: // Called when the game starts or when spawned virtual void BeginPlay() override; virtual FGenericTeamId GetGenericTeamId() const { return FGenericTeamId(TeamId); } virtual ETeamAttitude::Type GetTeamAttitudeTowards(const AActor& Other) const override { return ETeamAttitude::Hostile; } public: UPROPERTY(EditAnywhere, Category = Team) uint8 TeamId; // Called every frame virtual void Tick(float DeltaTime) override; // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; };