Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated gdscript code to reflect proto changes. #233

Merged
merged 10 commits into from
Dec 29, 2023
12 changes: 12 additions & 0 deletions Category2D.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends Node2D

var paths2d: Array = []
var subcategories: Array = []

func add_path2d(path):
self.add_child(path, true)
paths2d.push_back(path)

func add_subcategory(subcategory):
self.add_child(subcategory, true)
subcategories.push_back(subcategory)
6 changes: 6 additions & 0 deletions Category2D.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]

[ext_resource path="res://Category2D.gd" type="Script" id=1]

[node name="Category2D" type="Node2D"]
script = ExtResource( 1 )
18 changes: 18 additions & 0 deletions Category3D.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
extends Spatial

var paths: Array = []
var icons: Array = []
var subcategories: Array = []


func add_path(path):
self.add_child(path, true)
paths.push_back(path)

func add_icon(icon):
self.add_child(icon, true)
icons.push_back(icon)

func add_subcategory(subcategory):
self.add_child(subcategory, true)
subcategories.push_back(subcategory)
6 changes: 6 additions & 0 deletions Category3D.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]

[ext_resource path="res://Category3D.gd" type="Script" id=1]

[node name="Category" type="Spatial"]
script = ExtResource( 1 )
6 changes: 6 additions & 0 deletions CategoryData.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const Waypoint = preload("res://waypoint.gd")

var category3d: Spatial
var category2d: Node2D
var waypoint_category: Waypoint.Category
var is_visible = false
Loading