reduce video memory usage by orders of magnitude
big fonts use lots of big lumalpha8, so just scale up small fonts
This commit is contained in:
parent
df7736a9d1
commit
f7e85724b3
9 changed files with 54 additions and 45 deletions
14
elements/ring.gd
Normal file
14
elements/ring.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
class_name Ring
|
||||
extends CSGTorus3D
|
||||
|
||||
var happy_material = preload("res://graphics/happy_material.tres")
|
||||
|
||||
var collected = false
|
||||
signal collect_signal
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
if collected == false and body.name == "Sphere":
|
||||
self.material = happy_material
|
||||
collected = true
|
||||
$AudioStreamPlayer.play()
|
||||
collect_signal.emit()
|
1
elements/ring.gd.uid
Normal file
1
elements/ring.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://d1tdcd6b2bp05
|
|
@ -2,25 +2,9 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://graphics/unhappy_material.tres" id="1_48h5f"]
|
||||
[ext_resource type="AudioStream" uid="uid://b0cl5v6q1ocbv" path="res://sounds/ring1.ogg" id="2_2so43"]
|
||||
[ext_resource type="Script" uid="uid://d1tdcd6b2bp05" path="res://elements/ring.gd" id="2_288uq"]
|
||||
[ext_resource type="AudioStream" uid="uid://cvvs74ep5d4wt" path="res://sounds/ring2.ogg" id="3_lkqw0"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_86vhg"]
|
||||
script/source = "class_name Ring
|
||||
extends CSGTorus3D
|
||||
|
||||
var happy_material = preload(\"res://graphics/happy_material.tres\")
|
||||
|
||||
var collected = false
|
||||
signal collect_signal
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
if collected == false and body.name == \"Sphere\":
|
||||
self.material = happy_material
|
||||
collected = true
|
||||
$AudioStreamPlayer.play()
|
||||
collect_signal.emit()
|
||||
"
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tgirv"]
|
||||
radius = 4.0
|
||||
|
||||
|
@ -37,7 +21,8 @@ outer_radius = 8.0
|
|||
sides = 32
|
||||
ring_sides = 16
|
||||
material = ExtResource("1_48h5f")
|
||||
script = SubResource("GDScript_86vhg")
|
||||
script = ExtResource("2_288uq")
|
||||
metadata/_custom_type_script = "uid://d1tdcd6b2bp05"
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
[node name="Text" type="Label3D" parent="."]
|
||||
text = "Sample text"
|
||||
font_size = 1024
|
||||
font_size = 64
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5.1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue