Fixed item drops (barely) and added labels to begin work on fixing collision layers
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
.godot/
|
||||
godot-git-plugin-v3.1.1/addons/godot-git-plugin/win64/~libgit_plugin.windows.editor.x86_64.dll
|
||||
GameplayRecordings/desktop.ini
|
||||
*.dll
|
||||
|
||||
@@ -25,6 +25,11 @@ movie_writer/movie_file="C:/Users/derek/My Drive/First Person Test/GameplayRecor
|
||||
version_control/plugin_name="GitPlugin"
|
||||
version_control/autoload_on_startup=true
|
||||
|
||||
[global_group]
|
||||
|
||||
pickup=""
|
||||
enemy=""
|
||||
|
||||
[input]
|
||||
|
||||
move_left={
|
||||
@@ -108,6 +113,14 @@ interact={
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
3d_physics/layer_1="World"
|
||||
3d_physics/layer_2="Control"
|
||||
3d_physics/layer_3="Player"
|
||||
3d_physics/layer_4="Enemy"
|
||||
3d_physics/layer_5="Pickups"
|
||||
|
||||
[physics]
|
||||
|
||||
3d/physics_engine="JoltPhysics3D"
|
||||
|
||||
@@ -147,6 +147,6 @@ func die():
|
||||
func pickup_spawn():
|
||||
var item_type = pickups.pick_random()
|
||||
var item_spawn = item_type[0][0].instantiate()
|
||||
var item_name = item_type[1][0]
|
||||
#var item_name = item_type[1][0]
|
||||
item_spawn.rand_amt = randi_range(25,100)
|
||||
return item_spawn
|
||||
|
||||
@@ -18,6 +18,4 @@ func _ready():
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var lv_x = rng.randf_range(-10,10.0)
|
||||
var lv_y = rng.randf_range(-10.0,10.0)
|
||||
position = Vector2(viewportWidth/2 - (size.x/2), viewportHeight/2 - (size.y/2))
|
||||
|
||||
@@ -10,6 +10,7 @@ var taunts = ["hows your gut now you big cup of dumdum juice?",
|
||||
"schwing!",
|
||||
"hee hee",
|
||||
"stop trying",
|
||||
"you got hit with my bullet",
|
||||
"yowza!"]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
@@ -21,3 +22,4 @@ func _ready():
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
@@ -36,12 +36,14 @@ func picked_up():
|
||||
match pickupType:
|
||||
# Ammo
|
||||
0:
|
||||
var ammo_add_amount = rand_amt
|
||||
var ammo_add_amount : int = (rand_amt * .01) * player.gun.max_ammo #this is ugly and I don't like it but it works to force the random amount into being treated as float
|
||||
level_control.ammo_reserve[level_control.current_gun_index] += ammo_add_amount
|
||||
print("ammo + " +str(ammo_add_amount))
|
||||
# Stamina
|
||||
1:
|
||||
player.remaining_stamina += (rand_amt/100) * player.MAX_STAMINA
|
||||
var stamina_add_amount = (rand_amt * .01) * player.MAX_STAMINA
|
||||
player.remaining_stamina += stamina_add_amount
|
||||
print("stamina + " +str(stamina_add_amount))
|
||||
# Health
|
||||
2:
|
||||
level_control.health += 1
|
||||
|
||||
@@ -158,7 +158,6 @@ func fire(delta):
|
||||
player.weapon_recoil(delta)
|
||||
chamber.rotate_object_local(Vector3(0,-1,0),deg_to_rad(60))
|
||||
|
||||
|
||||
func reload(delta):
|
||||
if level_control.ammo_current[gun_index] < max_ammo and player.gun.anim_player.get_current_animation() != "reload" and level_control.ammo_reserve[gun_index] > 0:
|
||||
anim_player.play("reload")
|
||||
|
||||
Reference in New Issue
Block a user