generated from outfrost/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
16 changed files
with
272 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
extends Label | ||
|
||
func _show_value(value, travel, duration, spread): | ||
|
||
text = value | ||
var movement = travel.rotated(rand_range(-spread/2, spread/2)) | ||
var react_pivot_offset = rect_size / 2 | ||
|
||
$Tween.interpolate_property(self, "rect_position", | ||
rect_position, rect_position + movement, | ||
duration, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) | ||
$Tween.interpolate_property(self, "modulate:a", | ||
1.0, 0.0, duration,Tween.TRANS_BACK, | ||
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) | ||
|
||
$Tween.start() | ||
yield($Tween, "tween_all_completed") | ||
queue_free() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extends Node2D | ||
|
||
var FCT = preload("res://character/FCT.tscn") | ||
|
||
export var travel = Vector2(0, -80) | ||
export var duration = 2 | ||
export var spread = PI/2 | ||
|
||
func _show_value(value): | ||
var fct = FCT.instance() | ||
add_child(fct) | ||
fct._show_value(str(value), travel, duration, spread) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[gd_scene load_steps=4 format=2] | ||
|
||
[ext_resource path="res://FCT.gd" type="Script" id=1] | ||
[ext_resource path="res://font/Silver.ttf" type="DynamicFontData" id=2] | ||
|
||
[sub_resource type="DynamicFont" id=1] | ||
size = 12 | ||
outline_size = 1 | ||
outline_color = Color( 0, 0, 0, 1 ) | ||
font_data = ExtResource( 2 ) | ||
|
||
[node name="FCT" type="Label"] | ||
margin_right = 40.0 | ||
margin_bottom = 14.0 | ||
custom_fonts/font = SubResource( 1 ) | ||
script = ExtResource( 1 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Tween" type="Tween" parent="."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://FCTManager.gd" type="Script" id=1] | ||
|
||
[node name="FCTManager" type="Node2D"] | ||
script = ExtResource( 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.