-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
237 additions
and
311 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 |
---|---|---|
@@ -1,108 +1,111 @@ | ||
[gd_scene load_steps=9 format=2] | ||
[gd_scene load_steps=10 format=3 uid="uid://dxsvfhhmhdlxf"] | ||
|
||
[ext_resource path="res://addons/PACgd/Cole/Cole.gd" type="Script" id=1] | ||
[ext_resource path="res://addons/PACgd/Cole/spritesheet.png" type="Texture" id=2] | ||
[ext_resource path="res://addons/PACgd/Cole/Talk Bubble.gd" type="Script" id=3] | ||
[ext_resource type="Script" path="res://addons/PACgd/Cole/Cole.gd" id="1"] | ||
[ext_resource type="Texture2D" uid="uid://d17q42dswug3b" path="res://addons/PACgd/Cole/spritesheet.png" id="2"] | ||
[ext_resource type="Script" path="res://addons/PACgd/Cole/Talk Bubble.gd" id="3"] | ||
|
||
[sub_resource type="Animation" id=1] | ||
[sub_resource type="Animation" id="1"] | ||
length = 0.1 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Sprite:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath("Sprite2D:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PoolRealArray( 0 ), | ||
"transitions": PoolRealArray( 1 ), | ||
"times": PackedFloat32Array(0), | ||
"transitions": PackedFloat32Array(1), | ||
"update": 1, | ||
"values": [ 8 ] | ||
"values": [8] | ||
} | ||
|
||
[sub_resource type="Animation" id=2] | ||
[sub_resource type="Animation" id="2"] | ||
resource_name = "lower_hand" | ||
length = 0.375 | ||
step = 0.125 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Sprite:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath("Sprite2D:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PoolRealArray( 0, 0.125, 0.25 ), | ||
"transitions": PoolRealArray( 1, 1, 1 ), | ||
"times": PackedFloat32Array(0, 0.125, 0.25), | ||
"transitions": PackedFloat32Array(1, 1, 1), | ||
"update": 1, | ||
"values": [ 10, 9, 8 ] | ||
"values": [10, 9, 8] | ||
} | ||
|
||
[sub_resource type="Animation" id=3] | ||
[sub_resource type="Animation" id="3"] | ||
resource_name = "raise_hand" | ||
length = 0.25 | ||
step = 0.125 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Sprite:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath("Sprite2D:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PoolRealArray( 0, 0.125, 0.25 ), | ||
"transitions": PoolRealArray( 1, 1, 1 ), | ||
"times": PackedFloat32Array(0, 0.125, 0.25), | ||
"transitions": PackedFloat32Array(1, 1, 1), | ||
"update": 1, | ||
"values": [ 9, 10, 11 ] | ||
"values": [9, 10, 11] | ||
} | ||
|
||
[sub_resource type="Animation" id=4] | ||
loop = true | ||
[sub_resource type="Animation" id="4"] | ||
loop_mode = 1 | ||
step = 0.125 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Sprite:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath("Sprite2D:frame") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PoolRealArray( 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875 ), | ||
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), | ||
"times": PackedFloat32Array(0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875), | ||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), | ||
"update": 1, | ||
"values": [ 0, 1, 2, 3, 4, 5, 6, 7 ] | ||
"values": [0, 1, 2, 3, 4, 5, 6, 7] | ||
} | ||
|
||
[sub_resource type="BoxShape" id=5] | ||
extents = Vector3( 1.08514, 4.33591, 0.0757634 ) | ||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_01cuq"] | ||
_data = { | ||
"idle": SubResource("1"), | ||
"lower_hand": SubResource("2"), | ||
"raise_hand": SubResource("3"), | ||
"walk": SubResource("4") | ||
} | ||
|
||
[node name="Cole" type="KinematicBody"] | ||
[sub_resource type="BoxShape3D" id="5"] | ||
size = Vector3(1.08514, 4.33591, 0.0757634) | ||
|
||
[node name="Cole" type="CharacterBody3D"] | ||
input_ray_pickable = false | ||
script = ExtResource( 1 ) | ||
script = ExtResource("1") | ||
|
||
[node name="Animations" type="AnimationPlayer" parent="."] | ||
autoplay = "idle" | ||
anims/idle = SubResource( 1 ) | ||
anims/lower_hand = SubResource( 2 ) | ||
anims/raise_hand = SubResource( 3 ) | ||
anims/walk = SubResource( 4 ) | ||
libraries = { | ||
"": SubResource("AnimationLibrary_01cuq") | ||
} | ||
|
||
[node name="Sprite" type="Sprite3D" parent="."] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.43683, 0 ) | ||
use_in_baked_light = true | ||
texture = ExtResource( 2 ) | ||
[node name="Sprite2D" type="Sprite3D" parent="."] | ||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.43683, 0) | ||
alpha_cut = 2 | ||
texture = ExtResource("2") | ||
hframes = 8 | ||
vframes = 2 | ||
frame = 8 | ||
|
||
[node name="CollisionShape" type="CollisionShape" parent="."] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.41086, 0 ) | ||
shape = SubResource( 5 ) | ||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] | ||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.41086, 0) | ||
shape = SubResource("5") | ||
|
||
[node name="TalkBubble" type="RichTextLabel" parent="."] | ||
visible = false | ||
clip_contents = false | ||
grow_horizontal = 2 | ||
rect_clip_content = false | ||
bbcode_enabled = true | ||
tab_size = 0 | ||
scroll_active = false | ||
script = ExtResource( 3 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
tab_size = 0 | ||
script = ExtResource("3") |
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
extends RichTextLabel | ||
|
||
onready var cole = $".." | ||
@onready var cole = $".." | ||
|
||
func set_text(text: String): | ||
self.rect_size.x = self.get_font("font").get_string_size(text).x | ||
self.rect_size.y = self.get_font("font").get_string_size(text).y | ||
|
||
if cole is KinematicBody2D: | ||
self.rect_position.x = -self.rect_size.x / 2 | ||
self.size.x = self.get_theme_font("normal_font").get_string_size(text).x | ||
self.size.y = self.get_theme_font("normal_font").get_string_size(text).y | ||
|
||
if cole is CharacterBody2D: | ||
self.position.x = -self.size.x / 2 | ||
else: | ||
self.rect_position = cole.camera.unproject_position( | ||
self.position = cole.camera.unproject_position( | ||
cole.transform.origin + cole.talk_bubble_offset | ||
) - Vector2(self.rect_size.x / 2, 0) | ||
) - Vector2(self.size.x / 2, 0) | ||
|
||
self.text = text |
Oops, something went wrong.