Ball implemented, started work on game AI

This commit is contained in:
Segey Lapin
2019-07-30 13:23:34 +03:00
parent 0f1655ac81
commit 20b0ce05de
17 changed files with 400 additions and 21 deletions

View File

@@ -12,3 +12,6 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
#func _physics_process(delta):
# for obj in get_tree().get_nodes_in_group("characters"):
# pass

View File

@@ -27,7 +27,9 @@ func _process(delta):
var tf_turn = Transform(Quat(Vector3(0, 1, 0), PI * 0.6 * delta))
frame_tf *= tf_turn
if Input.is_action_just_pressed("action1"):
if monitored_objects.size() > 0:
if master_node.item_right_hand:
master_node.item_right_hand.activate()
elif monitored_objects.size() > 0:
var closest = monitored_objects[0]
var dst = master_node.global_transform.origin.distance_to(closest.global_transform.origin)
for k in monitored_objects:

View File

@@ -3,6 +3,7 @@ signal room_event
signal next_day
signal next_period
signal level_up
signal start_training
var money: int = 2000
var master_node