-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnemyPatterns.gd
101 lines (95 loc) · 2.13 KB
/
EnemyPatterns.gd
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
extends Node
onready var enemy1 = preload("res://Enemy.tscn")
onready var enemy2 = preload("res://Enemy2.tscn")
onready var enemy3 = preload("res://Enemy3.tscn")
var waves
var paths
# Called when the node enters the scene tree for the first time.
func _ready():
paths = [
load("res://enemy_paths/path1.tres"),
load("res://enemy_paths/path2.tres"),
load("res://enemy_paths/path3.tres"),
load("res://enemy_paths/path4.tres"),
load("res://enemy_paths/path5.tres"),
load("res://enemy_paths/path6.tres"),
load("res://enemy_paths/path7.tres"),
load("res://enemy_paths/path8.tres"),
load("res://enemy_paths/path9.tres"),
]
waves = [
{
"enemy": enemy1,
"count": 5,
"speed": 400,
"rotate": true,
"shoots": false,
"shoot_at_player": true,
"interval": 0.5,
"bullet_speed": 500,
},
{
"enemy": enemy1,
"count": 7,
"speed": 350,
"rotate": true,
"shoots": false,
"interval": 0.6,
"bullet_speed": 500,
},
{
"enemy": enemy2,
"count": 3,
"speed": 150,
"rotate": false,
"shoots": true,
"interval": 1,
"shoot_interval": 4,
"shoot_at_player": false,
"bullet_interval": 0.2,
"bullet_count": 4,
"bullet_speed": 250,
},
{
"enemy": enemy2,
"count": 2,
"speed": 100,
"rotate": false,
"shoots": true,
"interval": 2,
"shoot_interval": 5,
"shoot_at_player": false,
"bullet_interval": 0.2,
"bullet_count": 8,
"bullet_speed": 150,
},
{
"enemy": enemy3,
"count": 5,
"speed": 600,
"rotate": false,
"shoots": true,
"interval": 0.5,
"shoot_interval": 1.2,
"shoot_at_player": false,
"bullet_interval": 0.3,
"bullet_count": 3,
"bullet_speed": 400,
},
{
"enemy": enemy3,
"count": 5,
"speed": 600,
"rotate": false,
"shoots": true,
"interval": 0.5,
"shoot_interval": 1.2,
"shoot_at_player": false,
"bullet_interval": 0.3,
"bullet_count": 2,
"bullet_speed": 400,
},
]
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass