Added c++ test; now works
This commit is contained in:
parent
e77fe832f0
commit
52ae094087
|
|
@ -0,0 +1,13 @@
|
|||
extends Label
|
||||
|
||||
var counter := Test.new() # C++ class
|
||||
|
||||
func _ready() -> void:
|
||||
text += str(counter.get_counter())
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
#if Input.is_action_just_pressed("ui_accept"):
|
||||
counter.increment()
|
||||
var baseText := text
|
||||
baseText = baseText.left(baseText.length() - str(counter.get_counter()).length())
|
||||
text = baseText + str(counter.get_counter())
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://ceut2lrvkns75
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
[gd_scene format=3 uid="uid://b55w56d4twno1"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://b55w56d4twno1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ceut2lrvkns75" path="res://debug_label.gd" id="1_quyes"]
|
||||
|
||||
[node name="MolecularStag" type="Node2D"]
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
[node name="DebugLabel" type="Label" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "Debug: You made it into the game!"
|
||||
text = "Debug: You made it into the game!
|
||||
This is running from C++: "
|
||||
script = ExtResource("1_quyes")
|
||||
|
|
|
|||
Loading…
Reference in New Issue