Skip to content

Commit 877f562

Browse files
DoomTas3rdylanmccall
authored andcommitted
blocks: Add x of Vector2 and y of Vector2 blocks
1 parent f1ea1c5 commit 877f562

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://btsfimn63xhi2"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_dvsrc"]
4+
5+
[resource]
6+
script = ExtResource("1_dvsrc")
7+
name = &"vector2_x"
8+
target_node_class = ""
9+
description = "Gives the x of a [i]Vector2[/i]"
10+
category = "Math"
11+
type = 3
12+
variant_type = 3
13+
display_template = "x of {vector2: VECTOR2}"
14+
code_template = "{vector2}.x"
15+
defaults = {
16+
"vector2": Vector2(0, 0)
17+
}
18+
signal_name = ""
19+
scope = ""
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://ccbrbp4lee3wt"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_wuold"]
4+
5+
[resource]
6+
script = ExtResource("1_wuold")
7+
name = &"vector2_y"
8+
target_node_class = ""
9+
description = "Gives the y of a [i]Vector2[/i]"
10+
category = "Math"
11+
type = 3
12+
variant_type = 3
13+
display_template = "y of {vector2: VECTOR2}"
14+
code_template = "{vector2}.y"
15+
defaults = {
16+
"vector2": Vector2(0, 0)
17+
}
18+
signal_name = ""
19+
scope = ""

0 commit comments

Comments
 (0)