Add NPC and items walking.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/ui_mouse_icons/main_menu.gd" type="Script" id=1]
|
||||
|
||||
|
||||
[ext_resource path="res://game/ui/commons/main_menu.gd" type="Script" id=1]
|
||||
|
||||
[node name="main_menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
@@ -50,6 +48,7 @@ text = "Quit"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/new_game" to="." method="_on_new_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/load_game" to="." method="_on_load_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_pressed"]
|
||||
|
||||
@@ -85,12 +85,12 @@ func left_double_click_on_item(item_global_id : String, event : InputEvent) -> v
|
||||
## INVENTORY ##
|
||||
func left_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
|
||||
escoria.do("item_left_click", [inventory_item_global_id, event])
|
||||
if escoria.esc_runner.current_action == "use":
|
||||
var item = escoria.esc_runner.get_object(inventory_item_global_id)
|
||||
if item.texture:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(item.texture)
|
||||
elif item.inventory_item_scene_file.instance().texture_normal:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(item.inventory_item_scene_file.instance().texture_normal)
|
||||
# if escoria.esc_runner.current_action == "use":
|
||||
# var item = escoria.esc_runner.get_object(inventory_item_global_id)
|
||||
# if item.texture:
|
||||
# $ui/verbs_layer/verbs_menu.set_tool_texture(item.texture)
|
||||
# elif item.inventory_item_scene_file.instance().texture_normal:
|
||||
# $ui/verbs_layer/verbs_menu.set_tool_texture(item.inventory_item_scene_file.instance().texture_normal)
|
||||
|
||||
|
||||
func right_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/template_scenes/label/action_target_tooltip.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory/inventory_ui.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/verbs_menu.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://addons/escoria-core/game/scenes/dialogs/dialog_player.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/game.gd" type="Script" id=5]
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/items/ESCORIA_ALL_ITEMS.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui_container.gd" type="Script" id=3]
|
||||
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory/inventory_ui_container.gd" type="Script" id=3]
|
||||
|
||||
[node name="inventory_ui" type="Control"]
|
||||
script = ExtResource( 1 )
|
||||
@@ -33,5 +32,5 @@ custom_constants/hseparation = 16
|
||||
columns = 4
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="all_items" parent="." instance=ExtResource( 2 )]
|
||||
[node name="ESCORIA_ALL_ITEMS" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 269.391, 275.003 )
|
||||
@@ -1,12 +0,0 @@
|
||||
extends Control
|
||||
|
||||
|
||||
func _on_new_game_pressed():
|
||||
escoria.new_game()
|
||||
|
||||
func _on_load_game_pressed():
|
||||
# Show Loading screen
|
||||
pass
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
@@ -1,55 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/ui_mouse_icons/main_menu.gd" type="Script" id=1]
|
||||
|
||||
|
||||
|
||||
[node name="main_menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -92.0
|
||||
margin_top = -34.0
|
||||
margin_right = 92.0
|
||||
margin_bottom = 34.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="new_game" type="Button" parent="VBoxContainer"]
|
||||
margin_right = 184.0
|
||||
margin_bottom = 20.0
|
||||
text = "New game"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="load_game" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 24.0
|
||||
margin_right = 184.0
|
||||
margin_bottom = 44.0
|
||||
text = "Load game"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="quit" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 48.0
|
||||
margin_right = 184.0
|
||||
margin_bottom = 68.0
|
||||
text = "Quit"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="pressed" from="VBoxContainer/new_game" to="." method="_on_new_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/load_game" to="." method="_on_load_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_pressed"]
|
||||
Reference in New Issue
Block a user