aarg
This commit is contained in:
23
growth/Card/DashCardInject.tscn
Normal file
23
growth/Card/DashCardInject.tscn
Normal file
@@ -0,0 +1,23 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://b3piw7awjaxgj"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_cmuwy"]
|
||||
script/source = "extends Node
|
||||
|
||||
func activate(world, activator):
|
||||
if $Timer.time_left != 0:
|
||||
return
|
||||
$Timer.start()
|
||||
const easeFactor = 1;
|
||||
activator.velocity = activator.move_direction.normalize() * activator.dash_speed * easeFactor
|
||||
|
||||
func discard(world, activator):
|
||||
pass
|
||||
"
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
script = SubResource("GDScript_cmuwy")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
process_callback = 0
|
||||
wait_time = 0.3
|
||||
one_shot = true
|
||||
@@ -1,39 +1,17 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dg8euc6mh055m"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dg8euc6mh055m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c4x7n1r3ce1bc" path="res://Card/card.gd" id="1_yeifr"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_p5xmp"]
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_thmvr"]
|
||||
gradient = SubResource("Gradient_p5xmp")
|
||||
width = 104
|
||||
height = 71
|
||||
fill_to = Vector2(1, 1)
|
||||
|
||||
[node name="Card" type="AspectRatioContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 2
|
||||
ratio = 0.714
|
||||
[node name="Card" type="PanelContainer"]
|
||||
offset_right = 1.0
|
||||
script = ExtResource("1_yeifr")
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="."]
|
||||
layout_mode = 2
|
||||
texture = SubResource("GradientTexture2D_thmvr")
|
||||
region_rect = Rect2(10, 10, 76, 48)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="CenterContainer"]
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||
layout_mode = 2
|
||||
text = "Isnt that nice?"
|
||||
fit_content = true
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
columns = 3
|
||||
[node name="Label" type="Label" parent="RichTextLabel"]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "Test label"
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
extends Control
|
||||
|
||||
@export var inner_script: GDScript
|
||||
@export var behaviors = []
|
||||
|
||||
@export var title = ""
|
||||
|
||||
func activate():
|
||||
var foo_instance = inner_script.new()
|
||||
foo_instance.a()
|
||||
func _ready() -> void:
|
||||
$CenterContainer/RichTextLabel.text = title
|
||||
|
||||
func activate(world, activator):
|
||||
for behavior in behaviors:
|
||||
behavior.activate(world, activator)
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
extends AspectRatioContainer
|
||||
|
||||
func a():
|
||||
print("Test")
|
||||
pass
|
||||
func activate(world, activator, delta):
|
||||
dash_timer += delta;
|
||||
const easeFactor = 1;
|
||||
velocity = move_direction.normalize() * dash_speed * easeFactor;
|
||||
|
||||
if (dash_timer >= dash_end):
|
||||
dash_on_cooldown = true;
|
||||
dash_timer = 0;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@ var move_direction = Vector2.ZERO;
|
||||
var target = Vector2.ZERO # The position of the player's cursor.
|
||||
|
||||
const drawpile = [];
|
||||
const hand = [];
|
||||
@export var hand = [];
|
||||
const discard_pile = [];
|
||||
var active_card_index = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user