-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCutout.cs
52 lines (44 loc) · 1022 Bytes
/
Cutout.cs
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Cutout : MonoBehaviour {
[Header("Cutout Properties")]
public CutoutType type;
[HideInInspector]
public float velocity = 10;
public static List<CutoutType> CutoutTypes; //Loaded in GamePlay
public static Dictionary<CutoutType, GameObject> CutoutToGameobject; //Loaded in GamePlay
void Update () {
if (!Game.GameActive)
return;
//Move towards camera
transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z - velocity * Time.deltaTime);
if(transform.position.z <= -14) {
GamePlay.self.LooseRound();
}
}
public void AnimateDestruction() {
Destroy(this.gameObject);
}
}
public enum CutoutType {
Null,
_Flash,
_Frost,
_Nuke,
_Baby,
_Random,
_Reverse,
_Points,
L,
H,
T,
E,
F,
Exclaim,
P,
N,
V,
A,
S
}