From 902ec2c4a9a8a5a962ea5124c9bcce352486198a Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Fri, 15 Sep 2023 21:27:05 -0400 Subject: [PATCH] bug world text --- objects/hud/3d_text.gd | 4 +- objects/hud/3d_text.tscn | 164 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 158 insertions(+), 10 deletions(-) diff --git a/objects/hud/3d_text.gd b/objects/hud/3d_text.gd index aef81de..3dbe314 100644 --- a/objects/hud/3d_text.gd +++ b/objects/hud/3d_text.gd @@ -8,10 +8,10 @@ export var text_material: Material = null setget _set_material onready var text_mesh = $"%TextMesh" onready var animation_player = $"%AnimationPlayer" - +export var anim = "RESET" func _ready() -> void: - pass + animation_player.play(anim) func _set_text(value: String) -> void: diff --git a/objects/hud/3d_text.tscn b/objects/hud/3d_text.tscn index 847fdba..efdf9ad 100644 --- a/objects/hud/3d_text.tscn +++ b/objects/hud/3d_text.tscn @@ -1,20 +1,22 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=21 format=2] [ext_resource path="res://ui/PressStart2P-Regular.ttf" type="DynamicFontData" id=1] [ext_resource path="res://objects/hud/3d_text.gd" type="Script" id=2] [ext_resource path="res://ui/Kozuka Mincho Std H.otf" type="DynamicFontData" id=3] +[ext_resource path="res://ui/Boba Date.otf" type="DynamicFontData" id=4] -[sub_resource type="SpatialMaterial" id=12] -albedo_color = Color( 0.439216, 0.780392, 0.658824, 1 ) +[sub_resource type="SpatialMaterial" id=16] +albedo_color = Color( 0.105882, 0.34902, 0.509804, 1 ) +metallic = 0.46 -[sub_resource type="DynamicFont" id=8] +[sub_resource type="DynamicFont" id=19] font_data = ExtResource( 1 ) [sub_resource type="TextMesh" id=2] resource_local_to_scene = true -material = SubResource( 12 ) -text = "TEXT" -font = SubResource( 8 ) +material = SubResource( 16 ) +text = "WELC0ME T0 BUG W0RLD" +font = SubResource( 19 ) pixel_size = 0.05 depth = 0.1 @@ -113,10 +115,151 @@ tracks/0/keys = { "values": [ Vector3( 0, 1, -100 ), Vector3( 0, 1, 0 ) ] } +[sub_resource type="Animation" id=17] +resource_name = "bug world" +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("TextMesh:rotation_degrees") +tracks/0/interp = 2 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 360, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("TextMesh:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector3( 0.8, 0.8, 0.8 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("..:text_material") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ SubResource( 16 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("..:text") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ "WELC0ME T0 BUG W0RLD" ] +} +tracks/4/type = "value" +tracks/4/path = NodePath("TextMesh:mesh:font:font_data") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 4 ) ] +} + [sub_resource type="SpatialMaterial" id=9] albedo_color = Color( 0.901961, 0.133333, 0.133333, 1 ) metallic = 0.35 +[sub_resource type="Animation" id=18] +resource_name = "fucker" +length = 2.0 +step = 0.025 +tracks/0/type = "value" +tracks/0/path = NodePath("TextMesh:translation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 1.4, 1.825 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector3( 0, -3, 0 ), Vector3( 0, 1, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("TextMesh:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 1.4, 1.825 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector3( 0, 0, 0 ), Vector3( 1, 1, 1 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("TextMesh:rotation_degrees") +tracks/2/interp = 2 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 1.4, 1.825 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector3( 0, 180, 0 ), Vector3( 0, 0, 0 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("..:text_material") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 1.4 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ SubResource( 9 ) ] +} +tracks/4/type = "value" +tracks/4/path = NodePath("..:text") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 1.4 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ "FUCKER" ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("TextMesh:mesh:font:font_data") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 1.4 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 1 ) ] +} + [sub_resource type="Animation" id=10] resource_name = "game over" step = 0.025 @@ -261,6 +404,9 @@ tracks/4/keys = { "values": [ ExtResource( 1 ) ] } +[sub_resource type="SpatialMaterial" id=12] +albedo_color = Color( 0.439216, 0.780392, 0.658824, 1 ) + [sub_resource type="Animation" id=13] resource_name = "prey slaughtered" step = 0.05 @@ -421,7 +567,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 2 ) text = "TEXT" -text_material = SubResource( 12 ) +text_material = SubResource( 16 ) [node name="Viewport" type="Viewport" parent="."] size = Vector2( 256, 192 ) @@ -448,6 +594,8 @@ environment = SubResource( 4 ) unique_name_in_owner = true anims/RESET = SubResource( 5 ) "anims/Zoom Entrance" = SubResource( 6 ) +"anims/bug world" = SubResource( 17 ) +anims/fucker = SubResource( 18 ) "anims/game over" = SubResource( 10 ) "anims/level complete" = SubResource( 7 ) "anims/prey slaughtered" = SubResource( 13 )