-
Notifications
You must be signed in to change notification settings - Fork 4
/
weapon_db.gd
27 lines (21 loc) · 1.03 KB
/
weapon_db.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
extends Node
var weapon_db = {
"normal_laser":{"name":"normal_laser","shot_timer":0.2,"dmg":10,"bullet_speed":150,"bullet_life_timer":2,"max_ammo":50,"uses_ammo":false,"recharge_rate":0.5},
"dumb_missile":{"name":"dumb_missile","shot_timer":0.5,"dmg":20,"bullet_speed":160,"bullet_life_timer":2,"max_ammo":200,"uses_ammo":true,"recharge_rate":0.5},
"missile":{"name":"missile","shot_timer":1,"dmg":10,"bullet_speed":160,"bullet_life_timer":2,"max_ammo":50,"uses_ammo":true,"recharge_rate":0.5},
"flare":{"name":"flare","shot_timer":1,"dmg":0,"bullet_speed":0,"bullet_life_timer":20,"max_ammo":5,"uses_ammo":true,"recharge_rate":0.5},
}
func set_weapon(name,weapon):
var data = weapon_db[name]
weapon.name
weapon. weapon_name = data.name
weapon.shot_timer = data.shot_timer
weapon.dmg = data.dmg
weapon.bullet_speed = data.bullet_speed
weapon.bullet_life = data.bullet_life_timer
weapon.uses_ammo = data.uses_ammo
weapon.max_ammo = data.max_ammo
weapon.ammo = data.max_ammo
weapon.recharge_rate = data.recharge_rate
pass
#end set_weapon