removed not working dialog system advice making my own now

This commit is contained in:
2022-11-28 18:02:47 +01:00
parent aa2e732a93
commit 8fa39a2898
6 changed files with 3 additions and 98 deletions

View File

@@ -1,14 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://d14pjtkh0xmrk"]
[ext_resource type="Script" path="res://src/scene-scripts/gui/dialog_object_area.cs" id="1_ttc4e"]
[node name="dialog_area" type="Area2D"]
process_mode = 2
collision_layer = 0
collision_mask = 2
script = ExtResource("1_ttc4e")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
[connection signal="area_entered" from="." to="." method="onAreaEntered"]
[connection signal="area_exited" from="." to="." method="onAreaExited"]

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://cjqwrkx04evnr"] [gd_scene load_steps=5 format=3 uid="uid://42f1sggm2w0g"]
[ext_resource type="Texture2D" uid="uid://p5ubildre2tg" path="res://assets/textures/debug/cupcake.png" id="1_qmvgm"] [ext_resource type="Texture2D" uid="uid://p5ubildre2tg" path="res://assets/textures/debug/cupcake.png" id="1_qmvgm"]
[ext_resource type="PackedScene" uid="uid://d14pjtkh0xmrk" path="res://scenes/gui/trigger/dialog_object_area.tscn" id="2_m1t8o"] [ext_resource type="PackedScene" path="res://scenes/gui/trigger/dialog_object_area.tscn" id="2_m1t8o"]
[sub_resource type="CircleShape2D" id="CircleShape2D_2d5dy"] [sub_resource type="CircleShape2D" id="CircleShape2D_2d5dy"]
radius = 30.8058 radius = 30.8058

View File

@@ -1,42 +0,0 @@
using Godot;
using Godot.Collections;
using System;
using System.IO;
public partial class dialog_bubble : CanvasLayer
{
[Export(PropertyHint.File, "*.json,")]
public string textfile;
private Dictionary text;
private string[] selectedText;
private bool inProgress = false;
//ITS FUCKING GARBAGE I HATE THIS DOCUMENTATION
public override void _Ready()
{
var background = GetNode<ColorRect>("Background");
var textLabel = GetNode<ColorRect>("TextLabel");
background.Visible = false;
//text.Add(LoadSceneText(textVariant));
//signal_bus.Connect("DisplayDialog", this, "onDisplayDialog");
}
public string LoadSceneText(string textVariant)
{
if (File.Exists(textfile))
{
File.Open(textfile, FileMode.Open);
textVariant = JSON.ParseString(File.ReadAllText(textfile)).ToString();
}
return textVariant;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
}

View File

@@ -1,25 +0,0 @@
using Godot;
using System;
public partial class dialog_object_area : Area2D
{
[Export]
public string dialogKey = "";
public bool areaActive = false;
public override void _Input(InputEvent @event)
{
if(areaActive && @event.IsActionPressed("ui_accept"))
{
// signal_bus.EmitSignal("DialogDisplay", dialogKey);
}
}
public void onDialogAreaEntered()
{
areaActive = true;
}
public void onDialogAreaExited()
{
areaActive = false;
}
}

View File

@@ -1,8 +0,0 @@
using Godot;
using System;
public partial class signal_bus : Node
{
[Signal]
public delegate void DialogDisplayEventHandler(string textKey);
}

View File

@@ -1,17 +1,11 @@
[gd_resource type="TileSet" load_steps=5 format=3 uid="uid://txl24cadn8t4"] [gd_resource type="TileSet" load_steps=3 format=3 uid="uid://txl24cadn8t4"]
[ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"] [ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"]
[ext_resource type="PackedScene" path="res://scenes/tiles/dialog_debug_tile.tscn" id="2_5mcbp"]
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_h5u31"] [sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_h5u31"]
resource_name = "test" resource_name = "test"
scenes/0/scene = ExtResource("1_uxmn6") scenes/0/scene = ExtResource("1_uxmn6")
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_tg2xg"]
resource_name = "dialog-test"
scenes/1/scene = ExtResource("2_5mcbp")
[resource] [resource]
tile_size = Vector2i(64, 64) tile_size = Vector2i(64, 64)
sources/0 = SubResource("TileSetScenesCollectionSource_h5u31") sources/0 = SubResource("TileSetScenesCollectionSource_h5u31")
sources/1 = SubResource("TileSetScenesCollectionSource_tg2xg")