proto3 initial commit

This commit is contained in:
Segey Lapin
2020-04-13 12:45:25 +03:00
parent 69410badf6
commit 1084b6d5c3
1588 changed files with 368852 additions and 23 deletions

View File

@@ -0,0 +1,34 @@
extends Spatial
func _ready():
var e = $Area.connect("body_entered", self, "weapon_pick")
assert(e == OK)
func weapon_pick(body):
if !body.is_in_group("npc"):
return
assert(body.has_meta("weapon"))
assert(body.has_meta("action"))
# print("weapon picked")
if !body.has_meta("action"):
return
if body.get_meta("weapon") == false:
var action = body.get_meta("action")
if action == "find_weapon":
body.set_meta("weapon", true)
# body.set_meta("action", "")
# body.remove_meta("path")
# body.remove_meta("path_valid")
# body.remove_meta("target_loc")
# body.remove_meta("target_group")
queue_free()
# if body.get_meta("weapon") == true:
# var action = body.get_meta("action")
# if action == "find_weapon":
# body.set_meta("action", "")
# body.remove_meta("path")
# body.remove_meta("path_valid")
# body.remove_meta("target_loc")
# body.remove_meta("target_group")