-
-
Save fornof/f78211e5242f5fb050874a947e0e7726 to your computer and use it in GitHub Desktop.
MorganFreemanActor.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fill out your copyright notice in the Description page of Project Settings. | |
//#include "..\Source\Runtime\MediaAssets\Public\MediaPlayer.h" // this does not want to compile | |
#include "MorganFreemanActor.h" | |
// Sets default values | |
AMorganFreemanActor::AMorganFreemanActor() | |
{ | |
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | |
PrimaryActorTick.bCanEverTick = true; | |
TotalDamage = 200; | |
DamageTimeInSeconds = 1.4f; | |
} | |
//AMorganFreemanActor::AMorganFreemanActor() : | |
// TotalDamage(200), | |
// DamageTimeInSeconds(1.f) | |
//{} | |
// Called when the game starts or when spawned | |
void AMorganFreemanActor::BeginPlay() | |
{ | |
Super::BeginPlay(); | |
//UMediaPlayer * PlayTest; | |
} | |
// Called every frame | |
void AMorganFreemanActor::Tick(float DeltaTime) | |
{ | |
Super::Tick(DeltaTime); | |
} | |
void AMorganFreemanActor::CalculateValues() | |
{ | |
DamagePerSecond = TotalDamage / DamageTimeInSeconds; | |
} | |
void AMorganFreemanActor::PostInitProperties() | |
{ | |
Super::PostInitProperties(); | |
CalculateValues(); | |
} | |
#if WITH_EDITOR | |
void AMorganFreemanActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) | |
{ | |
CalculateValues(); | |
Super::PostEditChangeProperty(PropertyChangedEvent); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment