37 lines
962 B
C++
37 lines
962 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "BlasterGameMode.h"
|
|
#include "TeamsGameMode.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class BLASTER_API ATeamsGameMode : public ABlasterGameMode
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
ATeamsGameMode();
|
|
virtual void PostLogin(APlayerController* NewPlayer) override;
|
|
virtual void Logout(AController* Exiting) override;
|
|
virtual float CalculateDamage(AController* Attacker, AController* Victim, float BaseDamage) override;
|
|
virtual void PlayerEliminated(class ABlasterCharacter* EliminatedCharacter, class ABlasterPlayerController* VictimController,
|
|
class ABlasterPlayerController* AttackerController) override;
|
|
protected:
|
|
virtual void HandleMatchHasStarted() override;
|
|
|
|
private:
|
|
UPROPERTY()
|
|
class ABlasterGameState* BGameState;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
bool FriendlyFire = false;
|
|
|
|
void AssignToTeam(APlayerState* PlayerState);
|
|
|
|
};
|