gdscript now builtin in nodes
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bu1xkt4xi58ox"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/dialogue-system/dialog_trigger_area.gd" id="1_ua004"]
|
||||
[sub_resource type="GDScript" id="GDScript_enb1s"]
|
||||
resource_name = "dialog_trigger_variables"
|
||||
script/source = "extends Area2D
|
||||
|
||||
@export_file(\"*json\") var file = \"\"
|
||||
@export var title = \"\"
|
||||
@export var introducedVillager = false
|
||||
"
|
||||
|
||||
[node name="dialog_trigger_area" type="Area2D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_ua004")
|
||||
script = SubResource("GDScript_enb1s")
|
||||
|
||||
[node name="collision_shape_2d" type="CollisionShape2D" parent="."]
|
||||
|
@@ -23,7 +23,7 @@ metadata/_edit_lock_ = true
|
||||
|
||||
[node name="dialog_trigger_area" parent="." instance=ExtResource("2_blpmd")]
|
||||
file = "res://assets/lang/en/dialogue/npcs/villager_normal.json"
|
||||
title = "Debug cupcake"
|
||||
title = "Debug Cupcake"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="collision_shape_2d" parent="dialog_trigger_area" index="0"]
|
||||
|
@@ -1,14 +1,28 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c4dkrtswpv8cv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ciidukjv5k6oa" path="res://assets/textures/debug/banana.png" id="1_7651j"]
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/tiles/sound_debug_tile.gd" id="1_tukqg"]
|
||||
[ext_resource type="AudioStream" uid="uid://s64cl4x57oae" path="res://assets/audios/sound_explode.wav" id="3_dnu2u"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_krkfl"]
|
||||
resource_name = "sound_debug_tile"
|
||||
script/source = "extends StaticBody2D
|
||||
|
||||
@export var soundOn = true
|
||||
|
||||
func _ready():
|
||||
$audio_stream_player_2d.autoplay = soundOn
|
||||
if(soundOn):
|
||||
$audio_stream_player_2d.play()
|
||||
func OnAudioFinished():
|
||||
if(soundOn):
|
||||
$audio_stream_player_2d.play()
|
||||
"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2d5dy"]
|
||||
radius = 30.8058
|
||||
|
||||
[node name="first_debug_tile" type="StaticBody2D"]
|
||||
script = ExtResource("1_tukqg")
|
||||
[node name="sound_debug_tile" type="StaticBody2D"]
|
||||
script = SubResource("GDScript_krkfl")
|
||||
soundOn = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
@@ -1,5 +0,0 @@
|
||||
extends Area2D
|
||||
|
||||
@export_file("*json") var file = ""
|
||||
@export var title = ""
|
||||
@export var introducedVillager = false
|
||||
|
@@ -1,11 +0,0 @@
|
||||
extends StaticBody2D
|
||||
|
||||
@export var soundOn = true
|
||||
|
||||
func _ready():
|
||||
$audio_stream_player_2d.autoplay = soundOn
|
||||
if(soundOn):
|
||||
$audio_stream_player_2d.play()
|
||||
func OnAudioFinished():
|
||||
if(soundOn):
|
||||
$audio_stream_player_2d.play()
|
Reference in New Issue
Block a user