-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScissorAnomaly.cpp
More file actions
74 lines (48 loc) · 1.52 KB
/
ScissorAnomaly.cpp
File metadata and controls
74 lines (48 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Fill out your copyright notice in the Description page of Project Settings.
#include "ScissorAnomaly.h"
#include "TimerManager.h"
AScissorAnomaly::AScissorAnomaly()
{
PrimaryActorTick.bCanEverTick = true;
MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComponent"));
RootComponent = MeshComponent;
}
void AScissorAnomaly::BeginPlay()
{
Super::BeginPlay();
InitialLocation = GetActorLocation();
InitialRotation = GetActorRotation();
bIsScissorAnomalyTriggered = false;
bIsScissorDeath = false;
}
void AScissorAnomaly::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void AScissorAnomaly::TriggerAnomaly()
{
FVector NewLocation(-6583.0f, 13966.0f, 135.0f);
SetActorLocation(NewLocation);
FRotator NewRotation(0.0f, 0.0f, 180.0f);
SetActorRotation(NewRotation);
bIsScissorAnomalyTriggered = true;
//(X=-6583.000000,Y=13966.000000,Z=135.000000) -> Location left to the player character.
UnfixedAnamolyCount++;
}
void AScissorAnomaly::FixAnomaly()
{
SetActorLocation(InitialLocation);
SetActorRotation(InitialRotation);
bIsScissorAnomalyTriggered = false;
UnfixedAnamolyCount--;
}
void AScissorAnomaly::ScissorLocationToDeath()
{
FVector KillLocation(-6583.0f, 13994.0f, 135.0f);
// (X=-6583.000000,Y=13994.000000,Z=135.000000)
SetActorLocation(KillLocation);
}
void AScissorAnomaly::SetScissorDeathTrue()
{
bIsScissorDeath = true;
}