correct signal processing
This commit is contained in:
parent
74548cf1f6
commit
8c269ee556
18 changed files with 54 additions and 30 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
# Godot 4+ specific ignores
|
# Godot 4+ specific ignores
|
||||||
.godot/
|
.godot/
|
||||||
/android/
|
/android/
|
||||||
|
*.blend.import
|
||||||
|
|
@ -4,12 +4,11 @@ importer="scene"
|
||||||
importer_version=1
|
importer_version=1
|
||||||
type="PackedScene"
|
type="PackedScene"
|
||||||
uid="uid://ddnwvcwa6drqi"
|
uid="uid://ddnwvcwa6drqi"
|
||||||
path="res://.godot/imported/barrel.blend-d55ef0f77e7a5f2e77ecca4be941021a.scn"
|
valid=false
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Amanda/furni/tent/barrel.blend"
|
source_file="res://Amanda/furni/tent/barrel.blend"
|
||||||
dest_files=["res://.godot/imported/barrel.blend-d55ef0f77e7a5f2e77ecca4be941021a.scn"]
|
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,11 @@ importer="scene"
|
||||||
importer_version=1
|
importer_version=1
|
||||||
type="PackedScene"
|
type="PackedScene"
|
||||||
uid="uid://ptwannnym6kc"
|
uid="uid://ptwannnym6kc"
|
||||||
path="res://.godot/imported/tent.blend-c2e4a2ad0442aa1c9be7f4044876a350.scn"
|
valid=false
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Amanda/furni/tent/tent.blend"
|
source_file="res://Amanda/furni/tent/tent.blend"
|
||||||
dest_files=["res://.godot/imported/tent.blend-c2e4a2ad0442aa1c9be7f4044876a350.scn"]
|
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,11 @@ importer="scene"
|
||||||
importer_version=1
|
importer_version=1
|
||||||
type="PackedScene"
|
type="PackedScene"
|
||||||
uid="uid://bywn575nv8tm8"
|
uid="uid://bywn575nv8tm8"
|
||||||
path="res://.godot/imported/merchant_tent3.blend-6089b79591e5b9fc9fb6643f66087c87.scn"
|
valid=false
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Florian/Entity/People/merchant_tent3.blend"
|
source_file="res://Florian/Entity/People/merchant_tent3.blend"
|
||||||
dest_files=["res://.godot/imported/merchant_tent3.blend-6089b79591e5b9fc9fb6643f66087c87.scn"]
|
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://bab0m4cvoiouv"]
|
[gd_scene load_steps=7 format=3 uid="uid://bab0m4cvoiouv"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cbva1dnqoaopn" path="res://Nikita/level_popup.tscn" id="1_0h1bi"]
|
[ext_resource type="PackedScene" uid="uid://oxtnk076gboh" path="res://Nikita/level_popup.tscn" id="1_0h1bi"]
|
||||||
[ext_resource type="Script" uid="uid://1dr3112amj64" path="res://Nikita/3d_popup.gd" id="1_utlwn"]
|
[ext_resource type="Script" uid="uid://1dr3112amj64" path="res://Nikita/scripts/3d_popup.gd" id="1_utlwn"]
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_utlwn"]
|
[sub_resource type="QuadMesh" id="QuadMesh_utlwn"]
|
||||||
size = Vector2(0.6, 0.4)
|
size = Vector2(0.6, 0.4)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://cjlojmoyhw2cp"]
|
[gd_scene load_steps=9 format=3 uid="uid://cjlojmoyhw2cp"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://7fijqcjxggit" path="res://Nikita/source/Earth_Final.fbx" id="1_mnd7v"]
|
[ext_resource type="PackedScene" uid="uid://7fijqcjxggit" path="res://Nikita/source/Earth_Final.fbx" id="1_mnd7v"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cw4gkryn2sl7y" path="res://Nikita/textures/Earth2_Water_BaseColor.png" id="2_v2ft5"]
|
[ext_resource type="Texture2D" uid="uid://cw4gkryn2sl7y" path="res://Nikita/textures/Earth2_Water_BaseColor.png" id="2_v2ft5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://da0uksbt2mkqw" path="res://Nikita/textures/Earth2_Land_BaseColor.png" id="3_drefq"]
|
[ext_resource type="Texture2D" uid="uid://da0uksbt2mkqw" path="res://Nikita/textures/Earth2_Land_BaseColor.png" id="3_drefq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ccjwh4alvryho" path="res://Nikita/waypoint.tscn" id="4_drefq"]
|
[ext_resource type="PackedScene" uid="uid://ccjwh4alvryho" path="res://Nikita/waypoint.tscn" id="4_drefq"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://by5cq6m32hbor" path="res://Florian/Map/Oktoberfest.tscn" id="5_tyl1s"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tyl1s"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tyl1s"]
|
||||||
albedo_texture = ExtResource("2_v2ft5")
|
albedo_texture = ExtResource("2_v2ft5")
|
||||||
|
|
@ -12,6 +13,7 @@ albedo_texture = ExtResource("2_v2ft5")
|
||||||
albedo_texture = ExtResource("3_drefq")
|
albedo_texture = ExtResource("3_drefq")
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_drefq"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_drefq"]
|
||||||
|
radius = 0.444301
|
||||||
|
|
||||||
[node name="Earth_Final" instance=ExtResource("1_mnd7v")]
|
[node name="Earth_Final" instance=ExtResource("1_mnd7v")]
|
||||||
|
|
||||||
|
|
@ -24,7 +26,16 @@ surface_material_override/1 = SubResource("StandardMaterial3D_3pxso")
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="earth4/Area3D" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="earth4/Area3D" index="0"]
|
||||||
transform = Transform3D(0.17, 0, 0, 0, 0.17, 0, 0, 0, 0.17, 0, 0, 0)
|
transform = Transform3D(0.17, 0, 0, 0, 0.17, 0, 0, 0, 0.17, 0, 0, 0)
|
||||||
shape = SubResource("SphereShape3D_drefq")
|
shape = SubResource("SphereShape3D_drefq")
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[node name="WaypointTest" parent="." index="1" instance=ExtResource("4_drefq")]
|
[node name="WaypointOkt" parent="." index="1" instance=ExtResource("4_drefq")]
|
||||||
transform = Transform3D(0.01, 0, 0, 0, 0.01, 0, 0, 0, 0.01, 0.00702367, 0.0636012, 0.0580069)
|
transform = Transform3D(-0.01, 0, -8.74228e-10, 0, 0.01, 0, 8.74228e-10, 0, -0.01, 0.00702367, 0.0636012, 0.0580069)
|
||||||
|
scene_name = "Oktoberfest"
|
||||||
|
scene_description = "- help to light up the festival
|
||||||
|
- find the lost beer"
|
||||||
|
switch_to = ExtResource("5_tyl1s")
|
||||||
|
|
||||||
|
[node name="WaypointChi" parent="." index="2" instance=ExtResource("4_drefq")]
|
||||||
|
transform = Transform3D(-4.37114e-10, 0, -0.01, 0, 0.01, 0, 0.01, 0, -4.37114e-10, 0.0740627, 0.0439419, 0)
|
||||||
|
|
||||||
|
[node name="WaypointBal" parent="." index="3" instance=ExtResource("4_drefq")]
|
||||||
|
transform = Transform3D(-4.37114e-10, 0, 0.01, 0, 0.01, 0, -0.01, 0, -4.37114e-10, -0.0725918, 0.0486524, -0.0129466)
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0)
|
||||||
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0)
|
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0)
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
transform = Transform3D(0.0337074, -0.226039, 0.973535, 0.00782163, 0.974118, 0.225904, -0.999401, 0, 0.034603, 15.6131, 3.61956, 0)
|
transform = Transform3D(-0.0327197, -0.325403, -0.945009, 0.0112599, -0.945575, 0.325209, -0.999401, 1.5123e-09, 0.034603, -30.3869, 3.61956, 0)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://cbva1dnqoaopn"]
|
[gd_scene load_steps=4 format=3 uid="uid://oxtnk076gboh"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c1rdbsbip2wvj" path="res://Nikita/scripts/level_popup.gd" id="1_3awpt"]
|
[ext_resource type="Script" uid="uid://d1duimhkemcax" path="res://Nikita/scripts/level_popup.gd" id="1_3awpt"]
|
||||||
[ext_resource type="Texture2D" uid="uid://otyci5h617qa" path="res://Nikita/source/playbutton.png" id="1_ay7gq"]
|
[ext_resource type="Texture2D" uid="uid://otyci5h617qa" path="res://Nikita/source/playbutton.png" id="1_ay7gq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://hk701pejgl" path="res://Nikita/textures/popup.png" id="1_pk11s"]
|
[ext_resource type="Texture2D" uid="uid://hk701pejgl" path="res://Nikita/textures/popup.png" id="1_pk11s"]
|
||||||
|
|
||||||
|
|
@ -9,8 +9,9 @@ script = ExtResource("1_3awpt")
|
||||||
|
|
||||||
[node name="Name" type="Label" parent="."]
|
[node name="Name" type="Label" parent="."]
|
||||||
offset_left = 50.0
|
offset_left = 50.0
|
||||||
|
offset_top = 6.0
|
||||||
offset_right = 550.0
|
offset_right = 550.0
|
||||||
offset_bottom = 70.0
|
offset_bottom = 76.0
|
||||||
theme_override_font_sizes/font_size = 48
|
theme_override_font_sizes/font_size = 48
|
||||||
text = "Place name"
|
text = "Place name"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
@ -18,9 +19,9 @@ vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Description" type="Label" parent="."]
|
[node name="Description" type="Label" parent="."]
|
||||||
offset_left = 50.0
|
offset_left = 50.0
|
||||||
offset_top = 70.0
|
offset_top = 89.0
|
||||||
offset_right = 550.0
|
offset_right = 550.0
|
||||||
offset_bottom = 270.0
|
offset_bottom = 289.0
|
||||||
theme_override_font_sizes/font_size = 24
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "Objective:
|
text = "Objective:
|
||||||
"
|
"
|
||||||
|
|
@ -30,6 +31,7 @@ offset_left = 200.0
|
||||||
offset_top = 300.0
|
offset_top = 300.0
|
||||||
offset_right = 400.0
|
offset_right = 400.0
|
||||||
offset_bottom = 350.0
|
offset_bottom = 350.0
|
||||||
|
toggle_mode = true
|
||||||
icon = ExtResource("1_ay7gq")
|
icon = ExtResource("1_ay7gq")
|
||||||
flat = true
|
flat = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,11 @@ var last_event_time := -1.0
|
||||||
@onready var node_quad: MeshInstance3D = $Quad
|
@onready var node_quad: MeshInstance3D = $Quad
|
||||||
@onready var node_area: Area3D = $Quad/Area3D
|
@onready var node_area: Area3D = $Quad/Area3D
|
||||||
|
|
||||||
#var original_scale
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
node_area.mouse_entered.connect(_mouse_entered_area)
|
node_area.mouse_entered.connect(_mouse_entered_area)
|
||||||
node_area.mouse_exited.connect(_mouse_exited_area)
|
node_area.mouse_exited.connect(_mouse_exited_area)
|
||||||
node_area.input_event.connect(_mouse_input_event)
|
node_area.input_event.connect(_mouse_input_event)
|
||||||
#original_scale = $Quad.scale
|
|
||||||
# If the material is NOT set to use billboard settings, then avoid running billboard specific code
|
# If the material is NOT set to use billboard settings, then avoid running billboard specific code
|
||||||
#if node_quad.get_surface_override_material(0).billboard_mode == BaseMaterial3D.BillboardMode.BILLBOARD_DISABLED:
|
#if node_quad.get_surface_override_material(0).billboard_mode == BaseMaterial3D.BillboardMode.BILLBOARD_DISABLED:
|
||||||
#set_process(false)
|
#set_process(false)
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
|
signal enter_level
|
||||||
|
|
||||||
func _on_play_button_pressed() -> void:
|
func _on_play_button_pressed() -> void:
|
||||||
print("2D Button pressed!")
|
emit_signal("enter_level")
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
uid://c1rdbsbip2wvj
|
uid://d1duimhkemcax
|
||||||
|
|
|
||||||
3
Nikita/scripts/scene_loader.gd
Normal file
3
Nikita/scripts/scene_loader.gd
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
signal enter_level
|
||||||
1
Nikita/scripts/scene_loader.gd.uid
Normal file
1
Nikita/scripts/scene_loader.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dlk7wj2j31u10
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
|
@export var scene_name : String
|
||||||
|
@export_multiline var scene_description : String
|
||||||
|
@export var switch_to : PackedScene
|
||||||
|
|
||||||
var to_earth
|
var to_earth
|
||||||
var toggle_popup : bool = false
|
var toggle_popup : bool = false
|
||||||
|
|
||||||
|
|
@ -8,7 +12,11 @@ func _ready() -> void:
|
||||||
var cam = get_viewport().get_camera_3d()
|
var cam = get_viewport().get_camera_3d()
|
||||||
to_earth = (get_parent().global_position - global_position).normalized()
|
to_earth = (get_parent().global_position - global_position).normalized()
|
||||||
look_at(cam.global_position, Vector3.UP)
|
look_at(cam.global_position, Vector3.UP)
|
||||||
|
$Popup/SubViewport/LevelPopup/Name.text = scene_name
|
||||||
|
$Popup/SubViewport/LevelPopup/Description.text = scene_description
|
||||||
|
var child = $Popup/SubViewport/LevelPopup
|
||||||
|
child.enter_level.connect(_on_play_button_pressed)
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
var cam = get_viewport().get_camera_3d()
|
var cam = get_viewport().get_camera_3d()
|
||||||
var to_camera = (cam.global_position - global_position).normalized()
|
var to_camera = (cam.global_position - global_position).normalized()
|
||||||
|
|
@ -58,3 +66,6 @@ func _on_area_3d_input_event(camera: Node, event: InputEvent, event_position: Ve
|
||||||
if event is InputEventMouseButton and event.is_released() and event.button_index == MOUSE_BUTTON_LEFT:
|
if event is InputEventMouseButton and event.is_released() and event.button_index == MOUSE_BUTTON_LEFT:
|
||||||
toggle_popup = !toggle_popup
|
toggle_popup = !toggle_popup
|
||||||
get_node("Popup").visible = toggle_popup
|
get_node("Popup").visible = toggle_popup
|
||||||
|
|
||||||
|
func _on_play_button_pressed() -> void:
|
||||||
|
get_tree().change_scene_to_packed(switch_to)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
extends SubViewportContainer
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
$SubViewport.size = get_viewport().size
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://b2nb1jajwuv65
|
|
||||||
|
|
@ -11,7 +11,7 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="AllAroundTheWorld"
|
config/name="AllAroundTheWorld"
|
||||||
run/main_scene="uid://by5cq6m32hbor"
|
run/main_scene="uid://b6kb866y3e4aa"
|
||||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
|
@ -57,3 +57,7 @@ interact={
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
renderer/rendering_method="gl_compatibility"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue