CodeObjective1H

/*

--------------------------------------------------

Kill Humans

--------------------------------------------------

*/

 

#pragma once

#include "GameFramework/GameMode.h"

#include "ObjectiveBase.h"

#include "Objective1.generated.h"

 

class AUFOGameMode;

class UObjectiveBase;

 

 

UCLASS()

class UNREALPROJECT_API UObjective1 : public UObjectiveBase

{

 

GENERATED_BODY()

 

public:

 

//Init default values

UObjective1();

 

//Called when objective is created, used to hookup delegates to class functions

virtual void OnCreation() override;

 

//Called every frame to update calculations and status of objective

virtual void OnUpdate( float deltaTime ) override;

 

//Called by delegate when a Killed Human message is sent

UFUNCTION()

void OnHumanKilled();

 

private:

 

//variables to keep track of objective

int32 humansKilled;

int32 humansKilledNeeded;

 

//adds score and xp to player on completion

int32 scoreOnCompletion;

float xpOnCompletion;

 

 

};