Merge branch 'state_mangement'

This commit is contained in:
betalars 2023-06-28 01:05:12 +02:00
commit 352de2390f
78 changed files with 5137 additions and 436 deletions

BIN
design/cards-src/post-it0001.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0002.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0003.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0004.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0005.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0006.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0007.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0008.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0009.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0010.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0011.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/cards-src/post-it0012.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
design/post-its.blend (Stored with Git LFS)

Binary file not shown.

142
design/void_overlay.svg Normal file
View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="1024"
height="1024"
viewBox="0 0 270.93333 270.93333"
version="1.1"
id="svg5"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="void_overlay.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="0.64693624"
inkscape:cx="-183.17106"
inkscape:cy="428.17203"
inkscape:window-width="3840"
inkscape:window-height="2095"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient925">
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="0.83069605"
id="stop923" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop921" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient925"
id="radialGradient927"
cx="61.507626"
cy="103.71676"
fx="61.507626"
fy="103.71676"
r="37.458996"
gradientTransform="matrix(1.0848971,-0.01406165,0.0138466,1.0683051,-22.35128,-66.298143)"
gradientUnits="userSpaceOnUse" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter978"
x="-0.01480182"
y="-0.01480182"
width="1.0296036"
height="1.0296036">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.45032961"
id="feGaussianBlur980" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient925"
id="radialGradient988"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0848971,-0.01406165,0.0138466,1.0683051,-170.87366,-73.433246)"
cx="61.507626"
cy="103.71676"
fx="61.507626"
fy="103.71676"
r="37.458996" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient925"
id="radialGradient992"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0848971,-0.01406165,0.0138466,1.0683051,-170.87366,-73.433246)"
cx="61.507626"
cy="103.71676"
fx="61.507626"
fy="103.71676"
r="37.458996" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient925"
id="radialGradient996"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0848971,-0.01406165,0.0138466,1.0683051,-170.87366,-73.433246)"
cx="61.507626"
cy="103.71676"
fx="61.507626"
fy="103.71676"
r="37.458996" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="mix-blend-mode:normal;fill:url(#radialGradient927);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4, 7.99999;paint-order:stroke fill markers;filter:url(#filter978)"
id="path234"
cx="46.295574"
cy="40.149464"
r="36.50872"
transform="matrix(3.1115622,0,0,3.1115622,5.288915,8.187228)" />
<circle
style="mix-blend-mode:normal;fill:url(#radialGradient988);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4, 7.99999;paint-order:stroke fill markers;filter:url(#filter978)"
id="circle986"
cx="-102.22681"
cy="33.014359"
r="36.50872"
transform="matrix(-0.80533158,3.0055383,-3.0055383,-0.80533158,163.1273,460.36095)" />
<circle
style="mix-blend-mode:normal;fill:url(#radialGradient992);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4, 7.99999;paint-order:stroke fill markers;filter:url(#filter978)"
id="circle990"
cx="-102.22681"
cy="33.014359"
r="36.50872"
transform="matrix(-2.4562477,-1.9101484,1.9101484,-2.4562477,-189.30339,20.919674)" />
<circle
style="mix-blend-mode:normal;fill:url(#radialGradient996);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4, 7.99999;paint-order:stroke fill markers;filter:url(#filter978)"
id="circle994"
cx="-102.22681"
cy="33.014359"
r="36.50872"
transform="matrix(-2.6962828,1.5530224,-1.5530224,-2.6962828,-89.765778,394.04656)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
design/youth-construction.blend (Stored with Git LFS)

Binary file not shown.

BIN
design/youth-construction.blend1 (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,17 @@
extends Area3D
@onready var focus_forward = $UiWrapper/UiSprite/SubViewport/Collectable_ui
var has_mouse: bool = false
# Called when the node enters the scene tree for the first time.
func _ready():
connect("mouse_entered", Callable(self, "_on_mouse_entered"))
func _on_mouse_entered():
input_ray_pickable = false
$UiWrapper.show()
$UiWrapper/UiSprite/SubViewport/Collectable_ui.show()
has_mouse = true
func _on_mouse_exited():
assert(false)

Binary file not shown.

View File

@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bifax0g4ibrmk"
path="res://.godot/imported/childhood.mp3-75b6bdb0d41f6eee77b33307d4512502.mp3str"
[deps]
source_file="res://base-environments/youth_room/audio/childhood.mp3"
dest_files=["res://.godot/imported/childhood.mp3-75b6bdb0d41f6eee77b33307d4512502.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://ceoqo46r0kgfv"
path="res://.godot/imported/jui-jutsu.mp3-66c5cea1f8b020bac14c7aac58282da2.mp3str"
[deps]
source_file="res://base-environments/youth_room/audio/jui-jutsu.mp3"
dest_files=["res://.godot/imported/jui-jutsu.mp3-66c5cea1f8b020bac14c7aac58282da2.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
src/base-environments/youth_room/audio/lisa_youth_voice.ogg (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://bwh60165c3saj"
path="res://.godot/imported/lisa_youth_voice.ogg-d6f843c1b2d0d6639f6372cb8f6f7a9a.oggvorbisstr"
[deps]
source_file="res://base-environments/youth_room/audio/lisa_youth_voice.ogg"
dest_files=["res://.godot/imported/lisa_youth_voice.ogg-d6f843c1b2d0d6639f6372cb8f6f7a9a.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -28,7 +28,7 @@ func _process(delta):
func start():
$light_animation.play("light_up")
$AudioPlayer.play("intro")
$PlayerController.active = true
State.pass_focus_to($PlayerController)
current_mode = Modes.WALKING
func _update_scene(new_mode) -> int:
@ -36,7 +36,11 @@ func _update_scene(new_mode) -> int:
emit_signal("freeze")
elif new_mode == Modes.FREEZE:
emit_signal("freeze")
return new_mode
func _unhandled_input(event):
if event is InputEventMouseButton:
if event.pressed:
print("passed")
#State.pass_focus_to($PlayerController)

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://djkwd76o033io"]
[resource]
bus/0/mute = true
bus/1/name = &"text"
bus/1/solo = false
bus/1/mute = false

View File

@ -0,0 +1,282 @@
[gd_scene load_steps=3 format=3 uid="uid://bvowj4l8dtceu"]
[ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="1_xrckx"]
[ext_resource type="PackedScene" uid="uid://vkcdj8c3ytbq" path="res://logic-scenes/board/post-it.tscn" id="2_ucudl"]
[node name="board of devs" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="childhood" type="Control" parent="."]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="c_homework" parent="childhood" instance=ExtResource("1_xrckx")]
offset_left = 34.0
offset_top = 31.0
offset_right = 334.0
offset_bottom = 251.0
text = "I never put in much effort for homework "
[node name="p_good_grades" parent="childhood/c_homework" groups=["c_body", "c_boy_stuff", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 324.0
offset_top = 16.0
offset_right = 624.0
offset_bottom = 116.0
text = "but at least I get good grades."
[node name="p_upset_peers" parent="childhood/c_homework" groups=["c_Joy", "c_backlash", "c_boy_stuff", "c_comic_heroes", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 327.0
offset_top = 118.0
offset_right = 627.0
offset_bottom = 218.0
text = "and my peers were upset about that."
[node name="c_teachers" parent="childhood" instance=ExtResource("1_xrckx")]
offset_left = 35.0
offset_top = 261.0
offset_right = 335.0
offset_bottom = 481.0
text = "I like my teachers more than my classmates "
[node name="p_volunteering" parent="childhood/c_teachers" groups=["c_Joy", "c_backlash", "c_boy_stuff"] instance=ExtResource("2_ucudl")]
offset_left = 318.0
offset_top = 13.0
offset_right = 618.0
offset_bottom = 113.0
text = "doing voluntary social service at my school would be great."
[node name="p_becoming_teacher" parent="childhood/c_teachers" groups=["c_Joy", "c_backlash", "c_homework"] instance=ExtResource("2_ucudl")]
offset_left = 321.0
offset_top = 115.0
offset_right = 621.0
offset_bottom = 215.0
text = "maybe I want to become a teacher."
[node name="c_Joy" parent="childhood" instance=ExtResource("1_xrckx")]
offset_left = 40.0
offset_top = 489.0
offset_right = 340.0
offset_bottom = 709.0
text = "I can put ages into things I enjoy "
[node name="p_worried_mother" parent="childhood/c_Joy" groups=["c_body", "c_boy_stuff", "c_comic_heroes", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 320.0
offset_top = 7.0
offset_right = 620.0
offset_bottom = 107.0
text = "my mother would be worried about that"
[node name="p_thomas" parent="childhood/c_Joy" groups=["c_backlash", "c_comic_heroes", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 323.0
offset_top = 109.0
offset_right = 623.0
offset_bottom = 209.0
text = "Mr Thomas thinks that makes me gifted."
[node name="voice_training" type="Control" parent="."]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="c_comic_heroes" parent="voice_training" instance=ExtResource("1_xrckx")]
offset_left = 685.0
offset_top = 26.0
offset_right = 985.0
offset_bottom = 246.0
text = "Comic heroes are my role models "
[node name="p_effort" parent="voice_training/c_comic_heroes" groups=["c_Joy", "c_hit", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 324.0
offset_top = 16.0
offset_right = 624.0
offset_bottom = 116.0
text = "when I put in the effort, I can make the world a better place"
[node name="p_upset_peers" parent="voice_training/c_comic_heroes" groups=["c_Joy", "c_body", "c_boy_stuff", "c_hit"] instance=ExtResource("2_ucudl")]
offset_left = 327.0
offset_top = 118.0
offset_right = 627.0
offset_bottom = 218.0
text = "and I want to be like agent q!"
[node name="c_boy_stuff" parent="voice_training" instance=ExtResource("1_xrckx")]
offset_left = 691.0
offset_top = 270.0
offset_right = 991.0
offset_bottom = 490.0
text = "I like boy stuff "
[node name="p_slut" parent="voice_training/c_boy_stuff" groups=["c_Joy", "c_body", "c_hit", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 318.0
offset_top = 13.0
offset_right = 618.0
offset_bottom = 113.0
text = "others think I only pretend to."
[node name="p_girls" parent="voice_training/c_boy_stuff" groups=["c_Joy", "c_body", "c_comic_heroes", "c_hit", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 321.0
offset_top = 115.0
offset_right = 621.0
offset_bottom = 215.0
text = "and girls don't get that."
[node name="c_backlash" parent="voice_training" instance=ExtResource("1_xrckx")]
offset_left = 691.0
offset_top = 493.0
offset_right = 991.0
offset_bottom = 713.0
text = "Despite the backlash, I protected Joyo in front of class "
[node name="p_cross_friend" parent="voice_training/c_backlash" groups=["c_Joy", "c_boy_stuff", "c_comic_heroes", "c_hit"] instance=ExtResource("2_ucudl")]
offset_left = 320.0
offset_top = 7.0
offset_right = 620.0
offset_bottom = 107.0
text = "I would never cross a friend, even if it was for my own good."
[node name="p_reward" parent="voice_training/c_backlash" groups=["c_Joy"] instance=ExtResource("2_ucudl")]
offset_left = 323.0
offset_top = 109.0
offset_right = 623.0
offset_bottom = 209.0
text = "those who put in the effort should be rewarded."
[node name="juijutsu" type="Control" parent="."]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="c_body" parent="juijutsu" instance=ExtResource("1_xrckx")]
offset_left = 1332.0
offset_top = 34.0
offset_right = 1632.0
offset_bottom = 254.0
text = "my body makes me uncomfortable "
[node name="p_boobs" parent="juijutsu/c_body" groups=["c_boy_stuff"] instance=ExtResource("2_ucudl")]
offset_left = 324.0
offset_top = 16.0
offset_right = 624.0
offset_bottom = 116.0
text = "boobs are just not made for fighting."
[node name="p_fat" parent="juijutsu/c_body" instance=ExtResource("2_ucudl")]
offset_left = 327.0
offset_top = 118.0
offset_right = 627.0
offset_bottom = 218.0
text = "I despise all the fat on my hips."
[node name="c_hit" parent="juijutsu" instance=ExtResource("1_xrckx")]
offset_left = 1338.0
offset_top = 278.0
offset_right = 1638.0
offset_bottom = 498.0
text = "I know how to properly hit people "
[node name="p_confidence" parent="juijutsu/c_hit" groups=["c_Joy", "c_backlash", "c_boy_stuff", "c_comic_heroes", "c_homework"] instance=ExtResource("2_ucudl")]
offset_left = 318.0
offset_top = 13.0
offset_right = 618.0
offset_bottom = 113.0
text = "..., that gives me a lot of confidence."
[node name="p_vent" parent="juijutsu/c_hit" groups=["c_Joy", "c_backlash", "c_boy_stuff", "c_comic_heroes", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 321.0
offset_top = 115.0
offset_right = 621.0
offset_bottom = 215.0
text = "and thats a great vent."
[node name="c_void" parent="juijutsu" instance=ExtResource("1_xrckx")]
offset_left = 1338.0
offset_top = 501.0
offset_right = 1638.0
offset_bottom = 721.0
[node name="p_wet" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
offset_left = 320.0
offset_top = 7.0
offset_right = 620.0
offset_bottom = 107.0
text = "… I was wet, so I must have been into it."
[node name="p_stop" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
offset_left = 323.0
offset_top = 109.0
offset_right = 623.0
offset_bottom = 209.0
text = "… I didnt say stop."
[node name="test" type="Control" parent="."]
anchors_preset = 0
offset_left = 730.0
offset_top = -3.0
offset_right = 770.0
offset_bottom = 37.0
[node name="c_random1" parent="test" instance=ExtResource("1_xrckx")]
offset_left = 1332.0
offset_top = 34.0
offset_right = 1632.0
offset_bottom = 254.0
[node name="p_random11" parent="test/c_random1" groups=["c_boy_stuff"] instance=ExtResource("2_ucudl")]
offset_left = 324.0
offset_top = 16.0
offset_right = 624.0
offset_bottom = 116.0
text = "random 1"
[node name="p_random12" parent="test/c_random1" instance=ExtResource("2_ucudl")]
offset_left = 327.0
offset_top = 118.0
offset_right = 627.0
offset_bottom = 218.0
text = "random 1"
[node name="c_pick" parent="test" instance=ExtResource("1_xrckx")]
offset_left = 1338.0
offset_top = 278.0
offset_right = 1638.0
offset_bottom = 498.0
[node name="p_pick" parent="test/c_pick" groups=["c_Joy", "c_backlash", "c_boy_stuff", "c_comic_heroes", "c_homework"] instance=ExtResource("2_ucudl")]
offset_left = 318.0
offset_top = 13.0
offset_right = 618.0
offset_bottom = 113.0
text = "pick me 2"
[node name="p_goof" parent="test/c_pick" groups=["c_Joy", "c_backlash", "c_boy_stuff", "c_comic_heroes", "c_homework", "c_teachers"] instance=ExtResource("2_ucudl")]
offset_left = 321.0
offset_top = 115.0
offset_right = 621.0
offset_bottom = 215.0
text = "you done goofed"
[node name="c_random2" parent="test" instance=ExtResource("1_xrckx")]
offset_left = 1338.0
offset_top = 501.0
offset_right = 1638.0
offset_bottom = 721.0
[node name="p_random21" parent="test/c_random2" groups=["c_void"] instance=ExtResource("2_ucudl")]
offset_left = 320.0
offset_top = 7.0
offset_right = 620.0
offset_bottom = 107.0
text = "random 2"
[node name="p_random22" parent="test/c_random2" groups=["c_void"] instance=ExtResource("2_ucudl")]
offset_left = 323.0
offset_top = 109.0
offset_right = 623.0
offset_bottom = 209.0
text = "random 2"

View File

@ -0,0 +1,109 @@
extends CenterContainer
# Called when the node enters the scene tree for the first time.
func _ready():
$cards/card_1/AnimationPlayer.play("select")
await $cards/card_1/AnimationPlayer.animation_finished
$cards/card_1/AnimationPlayer.play("deselect")
$cards/card_2/AnimationPlayer.play("select")
await $cards/card_1/AnimationPlayer.animation_finished
$cards/card_2/AnimationPlayer.play("deselect")
$cards/card_3/AnimationPlayer.play("select")
await $cards/card_2/AnimationPlayer.animation_finished
$cards/card_3/AnimationPlayer.play("deselect")
await $cards/card_3/AnimationPlayer.animation_finished
$cards/card_1/AnimationPlayer.play("select")
await $cards/card_1/AnimationPlayer.animation_finished
$cards/card_1/AnimationPlayer.play("take")
$cards/card_2/AnimationPlayer.play("unshuffle")
$cards/card_3/AnimationPlayer.play("shuffle")
await $cards/card_3/AnimationPlayer.animation_finished
for card in $cards.get_children():
card.get_child(1).play("RESET")
$cards/card_2/AnimationPlayer.queue("select")
await $cards/card_2/AnimationPlayer.animation_finished
$cards/card_2/AnimationPlayer.play("take")
$cards/card_3/AnimationPlayer.play("unshuffle")
$cards/card_1/AnimationPlayer.play("shuffle")
await $cards/card_1/AnimationPlayer.animation_finished
for card in $cards.get_children():
card.get_child(1).play("RESET")
$cards/card_3/AnimationPlayer.queue("select")
await $cards/card_3/AnimationPlayer.animation_finished
$cards/card_3/AnimationPlayer.play("take")
$cards/card_1/AnimationPlayer.play("unshuffle")
$cards/card_2/AnimationPlayer.play("shuffle")
await $cards/card_2/AnimationPlayer.animation_finished
$postIts.show()
for card in $postIts.get_children():
card.get_child(1).play("post")
await $postIts/postIt_1/AnimationPlayer.animation_finished
$postIts/postIt_1/AnimationPlayer.play("select")
await $postIts/postIt_1/AnimationPlayer.animation_finished
$postIts/postIt_1/AnimationPlayer.play("deselect")
$postIts/postIt_2/AnimationPlayer.play("select")
await $postIts/postIt_2/AnimationPlayer.animation_finished
$postIts/postIt_2/AnimationPlayer.play("deselect")
$postIts/postIt_3/AnimationPlayer.play("select")
await $postIts/postIt_3/AnimationPlayer.animation_finished
$postIts/postIt_3/AnimationPlayer.play("deselect")
$postIts/postIt_4/AnimationPlayer.play("select")
await $postIts/postIt_4/AnimationPlayer.animation_finished
$postIts/postIt_4/AnimationPlayer.play("deselect")
$postIts/postIt_1/AnimationPlayer.play("select")
await get_tree().create_timer(1).timeout
$postIts/postIt_1/AnimationPlayer.play("pick")
$postIts/postIt_2/AnimationPlayer.play("shuffle")
$postIts/postIt_3/AnimationPlayer.play("unshuffle")
$postIts/postIt_4/AnimationPlayer.play("unshuffle")
await $postIts/postIt_2/AnimationPlayer.animation_finished
for card in $postIts.get_children():
card.get_child(1).play("post")
await $postIts/postIt_1/AnimationPlayer.animation_finished
$postIts/postIt_2/AnimationPlayer.play("select")
await get_tree().create_timer(1).timeout
$postIts/postIt_2/AnimationPlayer.play("pick")
$postIts/postIt_3/AnimationPlayer.play("shuffle")
$postIts/postIt_4/AnimationPlayer.play("unshuffle")
$postIts/postIt_1/AnimationPlayer.play("unshuffle")
await $postIts/postIt_3/AnimationPlayer.animation_finished
for card in $postIts.get_children():
card.get_child(1).play("post")
await $postIts/postIt_1/AnimationPlayer.animation_finished
$postIts/postIt_3/AnimationPlayer.play("select")
await get_tree().create_timer(1).timeout
$postIts/postIt_3/AnimationPlayer.play("pick")
$postIts/postIt_4/AnimationPlayer.play("shuffle")
$postIts/postIt_1/AnimationPlayer.play("unshuffle")
$postIts/postIt_2/AnimationPlayer.play("unshuffle")
await $postIts/postIt_4/AnimationPlayer.animation_finished
for card in $postIts.get_children():
card.get_child(1).play("post")
await $postIts/postIt_1/AnimationPlayer.animation_finished
$postIts/postIt_4/AnimationPlayer.play("select")
await get_tree().create_timer(1).timeout
$postIts/postIt_4/AnimationPlayer.play("pick")
$postIts/postIt_1/AnimationPlayer.play("shuffle")
$postIts/postIt_2/AnimationPlayer.play("unshuffle")
$postIts/postIt_3/AnimationPlayer.play("unshuffle")

View File

@ -1,8 +1,7 @@
extends Area3D
@onready var s: Sprite3D = $Sprite3D
@onready var v: SubViewport = $Sprite3D/SubViewport
@onready var sprite: Sprite3D = $UiSprite
@onready var viewport: SubViewport = $UiSprite/SubViewport
func _process(delta):
var camera = get_viewport().get_camera_3d()
@ -16,24 +15,26 @@ func _process(delta):
func _unhandled_input(event):
if event is InputEventMouse:
# Handled via _on_input_event.
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_RIGHT:
assert(false)
return
v.push_input(event)
viewport.push_input(event)
func _on_input_event(_camera: Camera3D, event: InputEvent, pos: Vector3, _normal: Vector3, _shape_idx: int):
# Position of the event in Sprite3D local coordinates.
var texture_3d_position = s.get_global_transform().affine_inverse() * pos
var texture_3d_position = sprite.get_global_transform().affine_inverse() * pos
#if !is_zero_approx(texture_3d_position.z):
# # Discard event because event didn't happen on the side of the Sprite3D.
# return
# Position of the event relative to the texture.
var texture_position: Vector2 = Vector2(texture_3d_position.x, -texture_3d_position.y) / s.pixel_size - s.get_item_rect().position
var texture_position: Vector2 = Vector2(texture_3d_position.x, -texture_3d_position.y) / sprite.pixel_size - sprite.get_item_rect().position
# Send mouse event.
var e: InputEvent = event.duplicate()
if e is InputEventMouse:
e.set_position(texture_position)
e.set_global_position(texture_position)
v.push_input(e)
viewport.push_input(e)
func _on_button_pressed():
print("Button pressed")

View File

@ -0,0 +1,27 @@
@tool
extends Button
func hide():
if visible == true:
var tween:Tween = create_tween()
custom_minimum_size = get_minimum_size()
var tmp = text
text = ""
tween.tween_property(self, "custom_minimum_size", Vector2(size.x, 0), 0.2)
update_minimum_size()
await tween.finished
visible = false
text = tmp
update_minimum_size()
func show():
if visible == false:
var tmp = text
var tween:Tween = create_tween()
tween.tween_property(self, "custom_minimum_size", get_minimum_size(), 0.2)
text = ""
update_minimum_size()
visible = true
await tween.finished
text = tmp

View File

@ -1,134 +1,8 @@
[gd_scene load_steps=14 format=3 uid="uid://bj3tbkmppabfq"]
[gd_scene load_steps=5 format=3 uid="uid://bj3tbkmppabfq"]
[ext_resource type="Shader" path="res://vfx/particle_mixer.gdshader" id="1_g8u1t"]
[ext_resource type="PackedScene" uid="uid://bdnesuqroi7ss" path="res://vfx/collectable_particles.tscn" id="1_7bqxo"]
[ext_resource type="Texture2D" uid="uid://dq7jm5ufknbb6" path="res://vfx/lens-flare-particle.png" id="2_mi0wa"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lpenh"]
render_priority = 0
shader = ExtResource("1_g8u1t")
shader_parameter/particle_color = null
shader_parameter/particle_texture = ExtResource("2_mi0wa")
[sub_resource type="Gradient" id="Gradient_tjuvm"]
offsets = PackedFloat32Array(0, 0.50813, 1)
colors = PackedColorArray(1, 0.877403, 0.516545, 1, 0.94702, 0.505309, 0.59484, 1, 0.735853, 0.324231, 0.687053, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_d2t20"]
gradient = SubResource("Gradient_tjuvm")
[sub_resource type="Gradient" id="Gradient_c8r4y"]
offsets = PackedFloat32Array(0, 0.00813008, 0.52439, 1)
colors = PackedColorArray(0, 0, 0, 1, 0.0284553, 0.0284553, 0.0284553, 1, 0.244776, 0.244776, 0.244776, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_2vogp"]
gradient = SubResource("Gradient_c8r4y")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_eegys"]
emission_shape = 1
emission_sphere_radius = 0.3
spread = 180.0
gravity = Vector3(0, 0.02, 0)
initial_velocity_max = 0.2
color_ramp = SubResource("GradientTexture1D_2vogp")
color_initial_ramp = SubResource("GradientTexture1D_d2t20")
turbulence_enabled = true
turbulence_noise_strength = 0.1
turbulence_noise_scale = 2.0
turbulence_noise_speed = Vector3(0.1, 0.3, 0.5)
turbulence_noise_speed_random = 0.3
turbulence_influence_min = 0.01
turbulence_influence_max = 0.03
turbulence_initial_displacement_max = 1.0
[sub_resource type="Shader" id="Shader_p2314"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.0.stable's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_disabled;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable;
uniform float point_size : hint_range(0,128);
uniform float roughness : hint_range(0,1);
uniform sampler2D texture_metallic : hint_default_white,filter_linear_mipmap,repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r,filter_linear_mipmap,repeat_enable;
uniform float specular;
uniform float metallic;
uniform int particles_anim_h_frames;
uniform int particles_anim_v_frames;
uniform bool particles_anim_loop;
uniform vec4 backlight : source_color;
uniform sampler2D texture_backlight : hint_default_black,filter_linear_mipmap,repeat_enable;
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
UV=UV*uv1_scale.xy+uv1_offset.xy;
mat4 mat_world = mat4(normalize(INV_VIEW_MATRIX[0]), normalize(INV_VIEW_MATRIX[1]) ,normalize(INV_VIEW_MATRIX[2]), MODEL_MATRIX[3]);
mat_world = mat_world * mat4(vec4(cos(INSTANCE_CUSTOM.x), -sin(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
MODELVIEW_MATRIX = VIEW_MATRIX * mat_world;
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
float h_frames = float(particles_anim_h_frames);
float v_frames = float(particles_anim_v_frames);
float particle_total_frames = float(particles_anim_h_frames * particles_anim_v_frames);
float particle_frame = floor(INSTANCE_CUSTOM.z * float(particle_total_frames));
if (!particles_anim_loop) {
particle_frame = clamp(particle_frame, 0.0, particle_total_frames - 1.0);
} else {
particle_frame = mod(particle_frame, particle_total_frames);
}
UV /= vec2(h_frames, v_frames);
UV += vec2(mod(particle_frame, h_frames) / h_frames, floor((particle_frame + 0.5) / h_frames) / v_frames);
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
float metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel);
METALLIC = metallic_tex * metallic;
vec4 roughness_texture_channel = vec4(1.0,0.0,0.0,0.0);
float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
SPECULAR = specular;
vec3 backlight_tex = texture(texture_backlight,base_uv).rgb;
BACKLIGHT = (backlight.rgb+backlight_tex);
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fgrmi"]
render_priority = 0
shader = SubResource("Shader_p2314")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = Plane(1, 0, 0, 0)
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/particles_anim_h_frames = 1
shader_parameter/particles_anim_v_frames = 1
shader_parameter/particles_anim_loop = false
shader_parameter/backlight = Color(0, 0, 0, 1)
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/texture_albedo = ExtResource("2_mi0wa")
shader_parameter/texture_backlight = ExtResource("2_mi0wa")
[sub_resource type="QuadMesh" id="QuadMesh_ea2fp"]
material = SubResource("ShaderMaterial_fgrmi")
size = Vector2(0.1, 0.1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xd7ns"]
specular_mode = 2
vertex_color_use_as_albedo = true
@ -147,14 +21,7 @@ metallic_specular = 1.0
[node name="Node3D" type="Node3D"]
[node name="collectable_particles" type="GPUParticles3D" parent="."]
material_override = SubResource("ShaderMaterial_lpenh")
material_overlay = SubResource("ShaderMaterial_lpenh")
cast_shadow = 0
amount = 100
lifetime = 10.0
process_material = SubResource("ParticleProcessMaterial_eegys")
draw_pass_1 = SubResource("QuadMesh_ea2fp")
[node name="collectable_particles" parent="." instance=ExtResource("1_7bqxo")]
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.66951)

View File

@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://52mr50b01ibd"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Button" type="Button" parent="."]
layout_mode = 0
offset_left = 495.0
offset_top = 163.0
offset_right = 634.0
offset_bottom = 235.0
text = "small boi"
[node name="Button2" type="Button" parent="."]
visible = false
layout_mode = 0
offset_left = 441.0
offset_top = 119.0
offset_right = 694.0
offset_bottom = 320.0
text = "big boi"

File diff suppressed because one or more lines are too long

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bwicl5q0lw06q"
path="res://.godot/imported/start_bottom.png-687c4ed67f36702eaa13bc180a11daac.ctex"
path="res://.godot/imported/bottom.png-3eb31957ef51fac0c94899c57d0847c3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/startup/start_bottom.png"
dest_files=["res://.godot/imported/start_bottom.png-687c4ed67f36702eaa13bc180a11daac.ctex"]
source_file="res://import/interface-elements/bottom.png"
dest_files=["res://.godot/imported/bottom.png-3eb31957ef51fac0c94899c57d0847c3.ctex"]
[params]

BIN
src/import/interface-elements/cursor.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://5a36ownywoa8"
path="res://.godot/imported/cursor.png-10cec2772e1d2948212bee924d0eb111.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://import/interface-elements/cursor.png"
dest_files=["res://.godot/imported/cursor.png-10cec2772e1d2948212bee924d0eb111.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
src/import/interface-elements/cursor_drag.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cr3xaxqvj8gla"
path="res://.godot/imported/cursor_drag.png-84fc75458df1f30de98b2e854ccd3631.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://import/interface-elements/cursor_drag.png"
dest_files=["res://.godot/imported/cursor_drag.png-84fc75458df1f30de98b2e854ccd3631.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
src/import/interface-elements/cursor_grab.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d005qvnbnishb"
path="res://.godot/imported/cursor_grab.png-f38d4369c64694a26a6f4ea70068e889.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://import/interface-elements/cursor_grab.png"
dest_files=["res://.godot/imported/cursor_grab.png-f38d4369c64694a26a6f4ea70068e889.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
src/import/interface-elements/cursor_point.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djocdj0psv4wq"
path="res://.godot/imported/cursor_point.png-0b3cad564cc0e3b9bb8ca527d95e8bfb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://import/interface-elements/cursor_point.png"
dest_files=["res://.godot/imported/cursor_point.png-0b3cad564cc0e3b9bb8ca527d95e8bfb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://d0ucjqi8tx6vt"
path="res://.godot/imported/start_frame.png-e3da868bb60eabb343abc46b5c0d68c9.ctex"
path="res://.godot/imported/frame.png-2a731741f972f4976de0b52bee013a7e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/startup/start_frame.png"
dest_files=["res://.godot/imported/start_frame.png-e3da868bb60eabb343abc46b5c0d68c9.ctex"]
source_file="res://import/interface-elements/frame.png"
dest_files=["res://.godot/imported/frame.png-2a731741f972f4976de0b52bee013a7e.ctex"]
[params]

View File

@ -0,0 +1,72 @@
extends Control
const dev_board_pre = preload("res://dev-util/board of devs.tscn")
var dev_board: Control
func _ready():
dev_board = dev_board_pre.instantiate()
if $cards.get_child_count(false) > 0:
$cards.get_children(false)[0].grab_focus()
# Testing code
for item in dev_board.find_children("*"):
if item is Card:
spawn_card((item as Card).duplicate())
elif item is PostIt:
spawn_postit((item as PostIt).duplicate())
func _process(delta: float):
pass
func spawn_card(card: Card):
$cards.add_child(card)
if $cards.get_child_count(false) == 1:
$cards.get_children(false)[0].grab_focus()
populate_focus_neighbors()
func spawn_postit(postit: PostIt):
$postits.add_child(postit)
populate_focus_neighbors()
func populate_focus_neighbors():
# TODO reorder cards based on position
if $cards.get_child_count(false) <= 0:
return
var first_card = $cards.get_children(false)[0]
var first_postit = $postits.get_children(false)[0] if $postits.get_child_count(false) > 0 else first_card
var first_board_card = $mindmap.get_children(false)[0] if $mindmap.get_child_count(false) > 0 else first_card
var cards = $cards.get_children(false) as Array[Card]
for i in cards.size():
var card = cards[i]
if card == first_card or not (card is Card):
continue
card.focus_neighbor_right = first_board_card # FIXME should be a valid focusable object, but it refuses
card.focus_neighbor_left = first_postit
card.focus_neighbor_up = cards[(i - 1) % cards.size()]
card.focus_neighbor_down = cards[(i + 1) % cards.size()]
var postits = $postits.get_children(false) as Array[PostIt]
for i in postits.size():
var postit = postits[i]
if not (postit is PostIt):
continue
postit.focus_neighbor_right = first_card
postit.focus_neighbor_left = first_board_card
postit.focus_neighbor_up = postits[(i - 1) % postits.size()]
postit.focus_neighbor_down = postits[(i + 1) % postits.size()]
var board_items = $mindmap.get_children(false) as Array
for i in board_items.size():
var board_item = board_items[i]
board_item.focus_neighbor_right = first_postit
board_item.focus_neighbor_left = first_card
board_item.focus_neighbor_up = board_items[(i - 1) % board_items.size()]
board_item.focus_neighbor_down = board_items[(i + 1) % board_items.size()]

View File

@ -0,0 +1,38 @@
[gd_scene load_steps=2 format=3 uid="uid://bpk4hhck7xb8a"]
[ext_resource type="Script" path="res://logic-scenes/board/board.gd" id="1_0rxlw"]
[node name="board" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_0rxlw")
[node name="mindmap" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="cards" type="Panel" parent="."]
custom_minimum_size = Vector2(100, 0)
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 30.0
grow_vertical = 2
[node name="postits" type="Panel" parent="."]
custom_minimum_size = Vector2(100, 0)
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 0
grow_vertical = 2

BIN
src/logic-scenes/board/card-textures/cardsheet.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://sv0nhkkur1tt"
path="res://.godot/imported/cardsheet.png-aa9a1276947e1ea9c07388cd560d5919.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/board/card-textures/cardsheet.png"
dest_files=["res://.godot/imported/cardsheet.png-aa9a1276947e1ea9c07388cd560d5919.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
src/logic-scenes/board/card-textures/postitsheet.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8ckkjmdegyis"
path="res://.godot/imported/postitsheet.png-a6afe1969b145c3d0f8e274a0a6fb36e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/board/card-textures/postitsheet.png"
dest_files=["res://.godot/imported/postitsheet.png-a6afe1969b145c3d0f8e274a0a6fb36e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,48 @@
@tool
extends Control
class_name Card
var compatible_postits: Array[PostIt] = []
var own_postits: Array[PostIt] = []
@export var text: String = "" :
set (value):
text = value
if is_inside_tree() or Engine.is_editor_hint():
$Label.text = value
$BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
if is_inside_tree():
$BackgroundSprite.void_active = value == ""
@export var voice_line: AudioStream = null
func _ready():
if not Engine.is_editor_hint() and is_inside_tree():
for postit in self.get_children():
if postit is PostIt: self.own_postits.append(postit as PostIt)
for postit in get_tree().get_nodes_in_group(name):
if postit is PostIt: self.compatible_postits.append(postit as PostIt)
compatible_postits.append_array(own_postits)
if own_postits.size() == 2:
own_postits[0].sibling = own_postits[1]
own_postits[1].sibling = own_postits[0]
$BackgroundSprite.frame = randi() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
$Label.text = self.text
func _process(delta: float) -> void:
pass
func replace_with(card: Card):
self.text = card.text
self.compatible_postits = card.compatible_postits
self.own_postits = card.own_postits
self.voice_line = card.voice_line
func _on_focus_entered():
print(self, "is focused")
func _on_focus_exited():
print(self, "is not focused")

View File

@ -0,0 +1,206 @@
[gd_scene load_steps=20 format=3 uid="uid://dy5rd437h5hsw"]
[ext_resource type="Script" path="res://logic-scenes/board/card.gd" id="1_emip0"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_ioijn"]
[ext_resource type="Texture2D" uid="uid://kpmk21d8rlso" path="res://logic-scenes/board/particle_textures/star.png" id="3_bwtbh"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="3_rktsa"]
[ext_resource type="Texture2D" uid="uid://bqilajx05t0eb" path="res://logic-scenes/board/particle_textures/void_nomotion.png" id="4_fwm1k"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("2_ioijn")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("2_ioijn")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 880, 600, 440)
[sub_resource type="SpriteFrames" id="SpriteFrames_ckivt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e7401")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="GDScript" id="GDScript_8bs16"]
script/source = "extends AnimatedSprite2D
@onready var particles = $GPUParticles2D
@onready var initial_position = position
var noise_position = randf()
var noise: Noise = FastNoiseLite.new()
var void_active:
set(become_void):
if not (void_active == become_void):
if is_inside_tree():
$GPUParticles2D.is_void = become_void
$GPUParticles2D.emitting = become_void
$Sprite2D.is_void = become_void
void_active = become_void
func _process(delta):
if void_active and not State.reduce_motion:
noise_position += delta * 10
var random_position = Vector2(noise.get_noise_1d(noise_position*2), noise.get_noise_1d(-noise_position))
random_position = random_position.normalized() * pow(random_position.length()*2, 3) * 5
position = initial_position - random_position
rotation = noise.get_noise_1d(noise_position*10) * random_position.length() * 0.01
particles.position = random_position
else: position = initial_position
"
[sub_resource type="Gradient" id="Gradient_v70nd"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.0529197, 0.191606, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.491329, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxq8p"]
gradient = SubResource("Gradient_v70nd")
[sub_resource type="Curve" id="Curve_q6cmf"]
_data = [Vector2(0, 0), 0.0, 3.16529, 0, 0, Vector2(0.241056, 0.191336), 0.132446, 0.132446, 0, 0, Vector2(1, 1), 3.94797, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_cg0w1"]
curve = SubResource("Curve_q6cmf")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_by44l"]
emission_shape = 6
emission_ring_axis = Vector3(0, 0, 1)
emission_ring_height = 0.0
emission_ring_radius = 180.0
emission_ring_inner_radius = 185.0
particle_flag_disable_z = true
spread = 180.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = -10.0
initial_velocity_max = 10.0
angular_velocity_min = -150.0
angular_velocity_max = -150.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.0
radial_accel_min = -20.0
radial_accel_max = -5.0
tangential_accel_min = 20.0
tangential_accel_max = 30.0
scale_min = 3.0
scale_max = 5.0
scale_curve = SubResource("CurveTexture_cg0w1")
color_ramp = SubResource("GradientTexture1D_xxq8p")
turbulence_noise_strength = 0.1
attractor_interaction_enabled = false
[sub_resource type="GDScript" id="GDScript_vjwk7"]
script/source = "extends GPUParticles2D
var is_void:bool = false
func _process(_delta):
self.visible = !State.reduce_motion and is_void
"
[sub_resource type="GDScript" id="GDScript_tgc0b"]
script/source = "extends Sprite2D
var is_void:bool = false
func _process(_delta):
self.visible = State.reduce_motion and is_void
"
[node name="card" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_left = -150.0
offset_top = -110.0
offset_right = 150.0
offset_bottom = 110.0
focus_mode = 2
script = ExtResource("1_emip0")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
clip_children = 2
position = Vector2(150, 110)
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_ckivt")
frame = 4
script = SubResource("GDScript_8bs16")
[node name="GPUParticles2D" type="GPUParticles2D" parent="BackgroundSprite"]
visible = false
amount = 500
process_material = SubResource("ParticleProcessMaterial_by44l")
texture = ExtResource("3_bwtbh")
lifetime = 2.5
speed_scale = 1.3
explosiveness = 0.2
randomness = 0.14
local_coords = true
script = SubResource("GDScript_vjwk7")
[node name="Sprite2D" type="Sprite2D" parent="BackgroundSprite"]
visible = false
scale = Vector2(0.4, 0.4)
texture = ExtResource("4_fwm1k")
script = SubResource("GDScript_tgc0b")
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -127.0
offset_top = -82.5
offset_right = 127.0
offset_bottom = 82.5
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_rktsa")
theme_type_variation = &"card_text"
autowrap_mode = 3
[node name="postit anchor" type="Control" parent="."]
anchors_preset = 0
offset_left = 100.0
offset_top = 148.0
offset_right = 140.0
offset_bottom = 188.0
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
[connection signal="focus_entered" from="postit anchor" to="." method="_on_postit_anchor_focus_entered"]

BIN
src/logic-scenes/board/particle_textures/star.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://kpmk21d8rlso"
path="res://.godot/imported/star.png-cb025d5aa45574fdb1b3cdd678fdbecd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/board/particle_textures/star.png"
dest_files=["res://.godot/imported/star.png-cb025d5aa45574fdb1b3cdd678fdbecd.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
src/logic-scenes/board/particle_textures/void_nomotion.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bqilajx05t0eb"
path="res://.godot/imported/void_nomotion.png-feea4a00de7607ab1e264c944eff6917.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://logic-scenes/board/particle_textures/void_nomotion.png"
dest_files=["res://.godot/imported/void_nomotion.png-feea4a00de7607ab1e264c944eff6917.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,31 @@
@tool
extends Control
class_name PostIt
var sibling
@export var text: String = "" :
set (value):
if is_inside_tree() or Engine.is_editor_hint():
$Label.text = value
$BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
text = value
@export var voice_line: AudioStream = null
func _ready() -> void:
$Label.text = self.text
$BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
func replace_with(postit: PostIt):
self.text = postit.text
self.voice_line = postit.voice_line
self.sibling = postit.sibling
func _process(delta: float) -> void:
pass
func _on_focus_entered():
print(self, "is focused")
func _on_focus_exited():
print(self, "is not focused")

View File

@ -0,0 +1,134 @@
[gd_scene load_steps=17 format=3 uid="uid://vkcdj8c3ytbq"]
[ext_resource type="Script" path="res://logic-scenes/board/post-it.gd" id="1_yvh5n"]
[ext_resource type="Texture2D" uid="uid://c8ckkjmdegyis" path="res://logic-scenes/board/card-textures/postitsheet.png" id="2_j17jn"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="3_hu2as"]
[sub_resource type="AtlasTexture" id="AtlasTexture_nj16s"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_23tiq"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_aomh0"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_n3svg"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_tfg7a"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_dtics"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_e0ocs"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_bpwg2"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_xaxol"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_ifitb"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_6slhe"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_4tk5m"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 440, 500, 220)
[sub_resource type="SpriteFrames" id="SpriteFrames_2amsi"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nj16s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_23tiq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aomh0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n3svg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tfg7a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dtics")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e0ocs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bpwg2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xaxol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ifitb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6slhe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4tk5m")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="post-it" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_left = -150.0
offset_top = -50.0
offset_right = 150.0
offset_bottom = 50.0
focus_mode = 2
script = ExtResource("1_yvh5n")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(150, 50)
scale = Vector2(0.65, 0.65)
sprite_frames = SubResource("SpriteFrames_2amsi")
frame = 5
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -139.5
offset_top = -50.0
offset_right = 137.5
offset_bottom = 47.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_hu2as")
theme_type_variation = &"card_text"
vertical_alignment = 1
autowrap_mode = 3
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]

View File

@ -0,0 +1,28 @@
[gd_resource type="VisualShader" load_steps=2 format=3 uid="uid://bwjioe14xggin"]
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_i5j4e"]
output_port_for_preview = 0
input_name = "color"
[resource]
code = "shader_type canvas_item;
void fragment() {
// Input:2
vec4 n_out2p0 = COLOR;
// Output:0
COLOR.rgb = vec3(n_out2p0.xyz);
}
"
graph_offset = Vector2(-496.091, 53.946)
mode = 1
flags/light_only = false
nodes/fragment/2/node = SubResource("VisualShaderNodeInput_i5j4e")
nodes/fragment/2/position = Vector2(-60, 180)
nodes/fragment/connections = PackedInt32Array(2, 0, 0, 0)

View File

@ -0,0 +1,204 @@
[gd_scene load_steps=20 format=3 uid="uid://dp4eps03igd3w"]
[ext_resource type="Script" path="res://logic-scenes/board/card.gd" id="1_6ceun"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_buevv"]
[ext_resource type="Texture2D" uid="uid://kpmk21d8rlso" path="res://logic-scenes/board/particle_textures/star.png" id="3_8wu8j"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="3_mi4ah"]
[ext_resource type="Texture2D" uid="uid://bqilajx05t0eb" path="res://logic-scenes/board/particle_textures/void_nomotion.png" id="4_jam8u"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 880, 600, 440)
[sub_resource type="SpriteFrames" id="SpriteFrames_ckivt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e7401")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="GDScript" id="GDScript_8bs16"]
script/source = "extends AnimatedSprite2D
@onready var particles = $GPUParticles2D
@onready var initial_position = position
var noise_position = randf()
var noise: Noise = FastNoiseLite.new()
var void_active:
set(become_void):
if not (void_active == become_void):
if is_inside_tree():
$GPUParticles2D.is_void = become_void
$GPUParticles2D.emitting = become_void
$Sprite2D.is_void = become_void
void_active = become_void
func _process(delta):
if void_active and not State.reduce_motion:
noise_position += delta * 10
var random_position = Vector2(noise.get_noise_1d(noise_position*2), noise.get_noise_1d(-noise_position))
random_position = random_position.normalized() * pow(random_position.length()*2, 3) * 5
position = initial_position - random_position
rotation = noise.get_noise_1d(noise_position*10) * random_position.length() * 0.01
particles.position = random_position
else: position = initial_position
"
[sub_resource type="Gradient" id="Gradient_v70nd"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.0529197, 0.191606, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.491329, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxq8p"]
gradient = SubResource("Gradient_v70nd")
[sub_resource type="Curve" id="Curve_q6cmf"]
_data = [Vector2(0, 0), 0.0, 3.16529, 0, 0, Vector2(0.241056, 0.191336), 0.132446, 0.132446, 0, 0, Vector2(1, 1), 3.94797, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_cg0w1"]
curve = SubResource("Curve_q6cmf")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_by44l"]
emission_shape = 6
emission_ring_axis = Vector3(0, 0, 1)
emission_ring_height = 0.0
emission_ring_radius = 180.0
emission_ring_inner_radius = 185.0
particle_flag_disable_z = true
spread = 180.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = -10.0
initial_velocity_max = 10.0
angular_velocity_min = -150.0
angular_velocity_max = -150.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.0
radial_accel_min = -20.0
radial_accel_max = -5.0
tangential_accel_min = 20.0
tangential_accel_max = 30.0
scale_min = 1.5
scale_max = 3.0
scale_curve = SubResource("CurveTexture_cg0w1")
color_ramp = SubResource("GradientTexture1D_xxq8p")
turbulence_noise_strength = 0.1
attractor_interaction_enabled = false
[sub_resource type="GDScript" id="GDScript_vjwk7"]
script/source = "extends GPUParticles2D
var is_void:bool = false
func _process(_delta):
self.visible = !State.reduce_motion and is_void
"
[sub_resource type="GDScript" id="GDScript_tgc0b"]
script/source = "extends Sprite2D
var is_void:bool = false
func _process(_delta):
self.visible = State.reduce_motion and is_void
"
[node name="card" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_left = -150.0
offset_top = -110.0
offset_right = 150.0
offset_bottom = 110.0
focus_mode = 2
script = ExtResource("1_6ceun")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
clip_children = 2
position = Vector2(150, 110)
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_ckivt")
frame = 2
script = SubResource("GDScript_8bs16")
[node name="GPUParticles2D" type="GPUParticles2D" parent="BackgroundSprite"]
amount = 500
process_material = SubResource("ParticleProcessMaterial_by44l")
texture = ExtResource("3_8wu8j")
lifetime = 2.5
speed_scale = 1.3
explosiveness = 0.2
randomness = 0.14
script = SubResource("GDScript_vjwk7")
[node name="Sprite2D" type="Sprite2D" parent="BackgroundSprite"]
visible = false
scale = Vector2(0.4, 0.4)
texture = ExtResource("4_jam8u")
script = SubResource("GDScript_tgc0b")
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -127.0
offset_top = -82.5
offset_right = 127.0
offset_bottom = 82.5
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_mi4ah")
theme_type_variation = &"card_text"
autowrap_mode = 3
[node name="postit anchor" type="Control" parent="."]
anchors_preset = 0
offset_left = 100.0
offset_top = 148.0
offset_right = 140.0
offset_bottom = 188.0
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
[connection signal="focus_entered" from="postit anchor" to="." method="_on_postit_anchor_focus_entered"]

View File

@ -0,0 +1,123 @@
extends CenterContainer
enum {
INI,
CARDS,
TRANSITION,
POSTS,
DONE
}
@onready var debug_board:Control = $"board of devs"
var has_focus = false:
set(focus):
if not focus == has_focus:
if focus:
for player in anim_players: player.play("reveal")
selection_state = CARDS # fixme
self.show()
has_focus = focus
var selection_state
var anim_players:Array
var curr_selection_id: int = -1:
set(new_id):
if selection_state == CARDS or selection_state == POSTS:
if not curr_selection_id == -1: anim_players[curr_selection_id].play("deselect")
if new_id > options.size() -1: curr_selection_id = 0
elif new_id < 0: curr_selection_id = options.size() - 1
else: curr_selection_id = new_id
anim_players[curr_selection_id].play("select")
else:
curr_selection_id = new_id
print(curr_selection_id)
var output:Array
var options:Array
# Called when the node enters the scene tree for the first time.
func _ready():
var card_controls = $cards.get_children()
for control in card_controls:
options.append(control.get_child(1))
anim_players.append(control.get_child(0))
selection_state = INI
fill_card_slots()
func fill_card_slots():
for i in range($cards.get_child_count()):
var card:Card = $cards.get_child(i).get_child(1)
card.replace_with(debug_board.get_child(0).get_child(i) as Card)
func fill_post_slots():
var post_its: Array[PostIt] = []
for card in output:
post_its.append_array(card.own_postits)
print(card.own_postits)
for i in range(post_its.size()):
options[i].replace_with(post_its[i])
func _unhandled_input(event):
if has_focus:
if event.is_action_pressed("ui_up") or event.is_action_pressed("ui_left") or event.is_action_pressed("ui_focus_next"):
curr_selection_id -= 1
elif event.is_action_pressed("ui_down") or event.is_action_pressed("ui_right") or event.is_action_pressed("ui_focus_prev"):
curr_selection_id += 1
if event.is_action_pressed("ui_accept"):
pick(curr_selection_id)
func pick(id: int):
if id == -1:
curr_selection_id = 0
return
anim_players[id].play("pick")
var yield_to = anim_players[id].animation_finished
output.append(options[id])
var sibling_id = -1
if selection_state == POSTS:
sibling_id = options.find(options[id].sibling)
print("yeet sibling ", sibling_id)
options.remove_at(id)
anim_players.remove_at(id)
randomize()
var winning_id = randi() % options.size()
print("Winning ID ", id)
if winning_id == sibling_id:
winning_id = (winning_id + 1) % options.size()
output.append(options.pop_at(winning_id))
anim_players.pop_at(winning_id).play("shuffle")
for anim in anim_players:
anim.play("unshuffle")
await yield_to
if selection_state == CARDS:
selection_state = TRANSITION
options = []
anim_players = []
for control in $postIts.get_children():
options.append(control.get_child(1))
anim_players.append(control.get_child(0))
control.get_child(0).play("post")
curr_selection_id = -1
fill_post_slots()
await anim_players[0].animation_finished
selection_state = POSTS

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,121 @@
@tool
extends CenterContainer
class_name Collectable_Ui
@export var collapsed = true:
set(collapse):
if is_inside_tree() and not Engine.is_editor_hint():
if State.reduce_motion:
collapsed = false
return
if collapse and not collapsed:
if is_inside_tree():
_hide_buttons()
collapsed = collapse
elif not collapse and collapsed:
if is_inside_tree():
_show_buttons()
collapsed = collapse
@export var is_story: bool = false
@export var has_focus: bool = false:
set(focused):
print("set focus of card to ", focused)
if has_focus == focused: return
if focused:
has_focus = true
print(visible)
if not visible: show()
collapsed = false
if collected:
$Panel/Content/Buttons/VBoxContainer/put_back.grab_focus()
else:
$Panel/Content/Buttons/VBoxContainer/collect_or_listen.grab_focus()
elif has_focus:
has_focus = false
get_viewport().gui_release_focus()
#hide()
@export var collected: bool = false:
set(set_collected):
collected = set_collected
if set_collected:
$Panel/Content/Buttons/VBoxContainer/put_back.show()
if is_story:
$Content/Buttons/VBoxContainer/put_back.disabled = true
$Content/Buttons/VBoxContainer/collect_or_listen.text = "listen again"
if State.allow_skipping:
$Content/Buttons/VBoxContainer/skip.text = "discard cards (skip)"
else:
$Content/Buttons/VBoxContainer/collect_or_listen.disabled = true
$Content/Buttons/VBoxContainer/put_back.show()
else:
$Content/Buttons/VBoxContainer/collect_or_listen.disabled = false
@export var skipped: bool = false
@export var item_name: String = "":
set(new_name):
item_name = new_name
if is_inside_tree():
$Content/Name.text = new_name
@export var content_notes: String = "":
set(new_notes):
content_notes = new_notes
if is_inside_tree():
$Content/Name.text = new_notes
signal card_collected
# Called when the node enters the scene tree for the first time.
func _ready():
#$Panel/Content/ContentNotes.visible = State.show_content_notes
#$Panel/Content/Buttons/VBoxContainer/Summary.visible = State.provide_summaries
#$Panel/Content/Buttons/VBoxContainer/skip.visible = State.allow_skipping
if visible and not collapsed: _show_buttons()
func _hide_buttons():
if is_inside_tree():
if not State.reduce_motion: $AnimationPlayer.play_backwards("show_buttons")
func _show_buttons():
if is_inside_tree():
if not State.reduce_motion:
$AnimationPlayer.play("show_buttons")
else:
$AnimationPlayer.play("RESET")
else:
$AnimationPlayer.play("RESET")
func hide():
if visible:
_hide_buttons()
var tween = create_tween()
tween.tween_property(self, "modulate", 0, 0.4)
_hide_buttons()
await tween.finished
visible = false
func show():
if not collapsed:
_show_buttons()
modulate = Color()
visible = true
var tween = create_tween()
tween.tween_property(self, "modulate", Color(1, 1, 1), 0.4)
func _yoink_focus():
return # fixme
if not has_focus:
State.request_focus_for(self, true)
func _on_pick_button_pressed():
hide()
print("card collected!")
emit_signal("card_collected")
State.drop_focus(self)

View File

@ -1,22 +1,119 @@
[gd_scene format=3 uid="uid://cceyp2yd6o3sq"]
[gd_scene load_steps=9 format=3 uid="uid://d3pb25xuef2t2"]
[node name="CenterContainer" type="CenterContainer"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="1_2apkb"]
[ext_resource type="Script" path="res://logic-scenes/collectable/collectable_ui.gd" id="1_tgjc2"]
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="3_63j61"]
[sub_resource type="GDScript" id="GDScript_g0qhf"]
script/source = "@tool
extends Button
func hide():
if visible == true and not State.reduce_motion:
var tween:Tween = create_tween()
custom_minimum_size = get_minimum_size()
var tmp = text
text = \"\"
tween.tween_property(self, \"custom_minimum_size\", Vector2(size.x, 0), 0.2)
update_minimum_size()
await tween.finished
visible = false
text = tmp
update_minimum_size()
else:
visible = false
func show():
if visible == false and not State.reduce_motion:
var tmp = text
var tween:Tween = create_tween()
tween.tween_property(self, \"custom_minimum_size\", get_minimum_size(), 0.2)
text = \"\"
update_minimum_size()
visible = true
await tween.finished
text = tmp
else:
visible = true
"
[sub_resource type="Animation" id="Animation_rhsmi"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/Content/Buttons:custom_minimum_size")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 256)]
}
[sub_resource type="Animation" id="Animation_bq4rh"]
resource_name = "invisible"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/Content/Buttons:custom_minimum_size")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_rx43a"]
resource_name = "show_buttons"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/Content/Buttons:custom_minimum_size")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.4, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 135), Vector2(0, 130)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jad23"]
_data = {
"RESET": SubResource("Animation_rhsmi"),
"invisible": SubResource("Animation_bq4rh"),
"show_buttons": SubResource("Animation_rx43a")
}
[node name="CollectableUi" type="CenterContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_2apkb")
script = ExtResource("1_tgjc2")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
[node name="Panel" type="PanelContainer" parent="."]
layout_mode = 2
[node name="Name" type="Label" parent="VBoxContainer"]
[node name="Content" type="VBoxContainer" parent="Panel"]
layout_mode = 2
[node name="Name" type="Label" parent="Panel/Content"]
layout_mode = 2
theme_type_variation = &"HeaderLarge"
text = "old Mask"
horizontal_alignment = 1
[node name="Content Notes" type="RichTextLabel" parent="VBoxContainer"]
[node name="ContentNotes" type="RichTextLabel" parent="Panel/Content"]
visible = false
custom_minimum_size = Vector2(256, 0)
layout_mode = 2
bbcode_enabled = true
@ -25,21 +122,56 @@ Food, Blood, Gore, Whatever, I need a second line.
[/center]"
fit_content = true
[node name="collect_or_listen" type="Button" parent="VBoxContainer"]
[node name="Buttons" type="ScrollContainer" parent="Panel/Content"]
custom_minimum_size = Vector2(0, 256)
layout_mode = 2
horizontal_scroll_mode = 0
vertical_scroll_mode = 3
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/Content/Buttons"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="collect_or_listen" type="Button" parent="Panel/Content/Buttons/VBoxContainer"]
layout_mode = 2
tooltip_text = "Take this with you, and listen to it's story."
text = "Collect"
script = SubResource("GDScript_g0qhf")
[node name="Summary" type="Button" parent="VBoxContainer"]
[node name="Summary" type="Button" parent="Panel/Content/Buttons/VBoxContainer"]
layout_mode = 2
tooltip_text = "Take this with you, but get a neutral description of it's story."
text = "get neutral summary"
script = SubResource("GDScript_g0qhf")
[node name="skip" type="Button" parent="VBoxContainer"]
[node name="skip" type="Button" parent="Panel/Content/Buttons/VBoxContainer"]
layout_mode = 2
tooltip_text = "Choose this to entirely skip this Item without being unable to progress in the story. Skipped Segments can still be interacted with via the Pause Screen, if you decide to change your mind."
text = "skip"
script = SubResource("GDScript_g0qhf")
[node name="put_back" type="Button" parent="VBoxContainer"]
[node name="put_back" type="Button" parent="Panel/Content/Buttons/VBoxContainer"]
layout_mode = 2
text = "put back"
script = SubResource("GDScript_g0qhf")
[node name="StartFrame" type="TextureRect" parent="Panel"]
layout_mode = 2
mouse_filter = 2
texture = ExtResource("3_63j61")
expand_mode = 2
stretch_mode = 4
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "invisible"
libraries = {
"": SubResource("AnimationLibrary_jad23")
}
[connection signal="resized" from="Panel/Content/Buttons/VBoxContainer" to="Panel/Content/Buttons" method="_on_v_box_container_resized"]
[connection signal="focus_entered" from="Panel/Content/Buttons/VBoxContainer/collect_or_listen" to="." method="_yoink_focus"]
[connection signal="pressed" from="Panel/Content/Buttons/VBoxContainer/collect_or_listen" to="." method="_on_pick_button_pressed"]
[connection signal="focus_entered" from="Panel/Content/Buttons/VBoxContainer/Summary" to="." method="_yoink_focus"]
[connection signal="focus_entered" from="Panel/Content/Buttons/VBoxContainer/skip" to="." method="_yoink_focus"]
[connection signal="focus_entered" from="Panel/Content/Buttons/VBoxContainer/put_back" to="." method="_yoink_focus"]

BIN
src/logic-scenes/collectable/import/old-mask.glb (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,51 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bixvvxjlt1g24"
path="res://.godot/imported/old-mask.glb-1316622a7340cbc9493e3e0eb9b621cd.scn"
[deps]
source_file="res://logic-scenes/collectable/import/old-mask.glb"
dest_files=["res://.godot/imported/old-mask.glb-1316622a7340cbc9493e3e0eb9b621cd.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={
"materials": {
"desk-utilities": {
"use_external/enabled": true,
"use_external/path": "res://base-environments/youth_room/import/materials/desk-utilities.tres"
}
},
"meshes": {
"old-mask_old_mask": {
"generate/lightmap_uv": 0,
"generate/lods": 0,
"generate/shadow_meshes": 0,
"lods/normal_merge_angle": 60.0,
"lods/normal_split_angle": 25.0,
"save_to_file/enabled": true,
"save_to_file/make_streamable": "",
"save_to_file/path": "res://logic-scenes/collectable/import/old-mask.res"
}
}
}
gltf/embedded_image_handling=1

Binary file not shown.

View File

@ -0,0 +1,9 @@
extends Panel
@onready var has_focus = true:
set(focus):
if focus:
has_focus = State.request_focus(self)
else:
has_focus = false
State.drop_own_focus(self)

View File

@ -1,6 +1,32 @@
extends RigidBody3D
@export var active: bool = true : set = set_active
var has_focus: bool = false:
set(focused):
if has_focus != focused:
if focused:
has_focus = true
if is_inside_tree():
camera.make_current()
get_viewport().gui_release_focus()
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
var jitter_tween: Tween = create_tween()
jitter_tween.tween_property(self, "jitter_strength", 1, 1)
if has_entered: emit_signal("ui_entered")
elif has_focus:
camera.current = true
jitter_strength = 1
else:
if is_inside_tree() and has_focus:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
var jitter_tween: Tween = create_tween()
jitter_tween.tween_property(self, "jitter_strength", 0, 0.5)
if has_entered: emit_signal("ui_exited")
else:
jitter_strength = 0
has_focus = false
sleeping = has_focus
@export_range (0, 10) var max_speed: float = 3
@export_range (0, 10) var max_acceleration: float = 5
@export_range (0, 20) var damp: float = 10
@ -30,36 +56,32 @@ var on_crouch_cooldown:bool = false
@onready var pitch:Node3D = $Yaw/Pitch
@onready var mount:Node3D = $Yaw/Pitch/Mount
@onready var camera:Camera3D = $Yaw/Pitch/Mount/Camera3D
@onready var focus_ray: RayCast3D = $Yaw/Pitch/Mount/Camera3D/RayCast3D
func set_active(activate):
active = activate
if !is_inside_tree(): return
if activate:
camera.make_current()
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
var jitter_tween: Tween = create_tween()
jitter_tween.tween_property(self, "jitter_strength", 1, 1)
else:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
var jitter_tween: Tween = create_tween()
jitter_tween.tween_property(self, "jitter_strength", 0, 0.5)
sleeping = active
signal ui_entered
var has_entered:bool = false
signal ui_exited
func _ready():
if active:
set_active(active)
jitter_strength = 1
_handle_jitter(0)
func _process(delta):
if Input.is_action_just_pressed("ui_cancel"):
set_active(!active)
if focus_ray.get_collider() != null:
emit_signal("ui_entered")
has_entered = true
if has_entered:
if focus_ray.get_collider() == null:
emit_signal("ui_exited")
has_entered = false
if Input.is_action_just_pressed("ui_accept"):
State.pass_focus_to(focus_ray.get_collider())
func _physics_process(delta:float):
_handle_movement(delta)
_handle_rotation(delta)
if has_focus:
_handle_movement(delta)
_handle_rotation(delta)
if jitter_strength > 0: _handle_jitter(delta)
func _handle_movement(delta:float):
@ -85,7 +107,7 @@ func _handle_movement(delta:float):
func _handle_rotation(delta:float):
var smoothness = min(3, 60.0/Engine.get_frames_per_second())
var input_speed = Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_down")-Input.get_action_strength("look_up")) * gamepad_response
var input_speed = Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_up")-Input.get_action_strength("look_down")) * gamepad_response
if current_mouse_rotation.length()>0:
input_speed = current_mouse_rotation
@ -122,9 +144,19 @@ func _handle_mouse_input(event:InputEventMouseMotion):
current_mouse_rotation = event.relative
func _unhandled_input(event:InputEvent):
if active:
if has_focus:
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
_handle_mouse_input(event)
get_viewport().set_input_as_handled()
if event is InputEventMouseButton and has_entered:
State.free_focus()
get_viewport().set_input_as_handled()
#if event.is_action_pressed("ui_accept"):
# State.pass_focus_to(focus_ray.get_collider())
# get_viewport().set_input_as_handled()
func _on_empty_click():
State.request_focus_for(self, true)
func _on_bed_enter(_body):
if not (crouched or on_crouch_cooldown):

View File

@ -1,10 +1,18 @@
[gd_scene load_steps=8 format=3 uid="uid://mkccbig41bqb"]
[gd_scene load_steps=11 format=3 uid="uid://mkccbig41bqb"]
[ext_resource type="Script" path="res://logic-scenes/player_controller/player_controller.gd" id="1_0b4mi"]
[ext_resource type="ArrayMesh" uid="uid://bfc3d4g40n0wy" path="res://logic-scenes/collectable/import/old-mask.res" id="2_vnej0"]
[sub_resource type="PhysicsMaterial" id="10"]
friction = 0.0
[sub_resource type="GDScript" id="GDScript_r0b38"]
script/source = "extends MeshInstance3D
func _process(delta):
rotate_y(delta/3)
"
[sub_resource type="SphereShape3D" id="8"]
radius = 0.307047
@ -34,6 +42,114 @@ tracks/1/keys = {
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount/old_mask2:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(5.96046e-08, 1.74846e-07, -7.10543e-15)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.11067, -0.0251684, -0.309266)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount:rotation")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1.49012e-07, 0, 0)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D:light_energy")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.4]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:light_energy")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.5]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D:visible")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:layers")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:visible")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/10/type = "value"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount/old_mask2:visible")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="12"]
resource_name = "crouch"
@ -63,6 +179,106 @@ tracks/1/keys = {
"values": [Vector3(0, 0, 0), Vector3(-30, 0, -10), Vector3(-20, 0, 3), Vector3(0, 0, 0), Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_5o0sk"]
resource_name = "mask_reveal"
length = 3.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 3),
"transitions": PackedFloat32Array(0.366021, 1),
"update": 0,
"values": [Vector3(0.376781, -0.521269, -0.513588), Vector3(0.18, -0.025, -0.309)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount:rotation")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 3),
"transitions": PackedFloat32Array(1, 0.378929),
"update": 0,
"values": [Vector3(0, -0.698132, 0), Vector3(1.49012e-07, 0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D:light_energy")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.8, 3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 0.4]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:light_energy")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.2, 3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.5]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:layers")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Yaw/Pitch/Mount/Camera3D/SpotLight3D2:visible")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Yaw/Pitch/Mount/Camera3D/memory mount/old_mask2:visible")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
[sub_resource type="Animation" id="14"]
resource_name = "stand_up"
length = 3.0
@ -95,6 +311,7 @@ tracks/1/keys = {
_data = {
"RESET": SubResource("11"),
"crouch": SubResource("12"),
"mask_reveal": SubResource("Animation_5o0sk"),
"stand_up": SubResource("14")
}
@ -120,12 +337,55 @@ transform = Transform3D(1, 0, 0, 0, 0.5, -0.866025, 0, 0.866025, 0.5, 0, 0.25649
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.202, 0.157)
current = true
[node name="RayCast3D" type="RayCast3D" parent="Yaw/Pitch/Mount/Camera3D"]
target_position = Vector3(0, 0, -1.3)
collision_mask = 17
collide_with_areas = true
collide_with_bodies = false
[node name="memory mount" type="Node3D" parent="Yaw/Pitch/Mount/Camera3D"]
transform = Transform3D(0.8, 0, 0, 0, 0.8, -7.15258e-08, 0, 1.1921e-07, 0.48, 0.11067, -0.0251684, -0.309266)
[node name="old_mask2" type="MeshInstance3D" parent="Yaw/Pitch/Mount/Camera3D/memory mount"]
transform = Transform3D(1, 1.75271e-14, 1.74846e-07, -7.10543e-15, 1, -5.96046e-08, -1.74846e-07, 5.96046e-08, 1, 0.0250661, 0, 0)
visible = false
mesh = ExtResource("2_vnej0")
skeleton = NodePath("")
script = SubResource("GDScript_r0b38")
[node name="OmniLight3D" type="OmniLight3D" parent="Yaw/Pitch/Mount/Camera3D/memory mount/old_mask2"]
transform = Transform3D(1, -3.8743e-07, 5.96046e-08, 3.57628e-07, 1, 8.9407e-08, -5.96046e-08, -8.9407e-08, 1, 0.083235, -0.219628, 0.176047)
light_color = Color(0.972549, 0.752941, 0.592157, 1)
light_energy = 0.1
light_specular = 0.0
omni_range = 0.457129
omni_attenuation = 0.659754
[node name="SpotLight3D" type="SpotLight3D" parent="Yaw/Pitch/Mount/Camera3D"]
transform = Transform3D(0.584488, 0.621177, -0.522028, 0.363951, 0.374307, 0.852897, 0.725199, -0.688501, -0.00729993, 0.0601956, 0.21754, -0.271749)
visible = false
light_color = Color(0.97599, 0.669299, 0.509314, 1)
light_energy = 0.4
light_size = 0.1
shadow_enabled = true
spot_range = 0.394683
spot_angle = 27.7927
[node name="SpotLight3D2" type="SpotLight3D" parent="Yaw/Pitch/Mount/Camera3D"]
transform = Transform3D(0.456583, 0.0747244, 0.886537, 0.819566, -0.423063, -0.386432, 0.346185, 0.903014, -0.254405, 0.475638, -0.147216, -0.329875)
visible = false
light_color = Color(0.317647, 0.427451, 1, 1)
light_energy = 1.5
light_size = 0.1
shadow_enabled = true
spot_range = 0.624277
spot_angle = 22.1657
[node name="PlayerCollision" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.322255, 0)
shape = SubResource("8")
[node name="PlayerAnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "RESET"
libraries = {
"": SubResource("AnimationLibrary_xbx3w")
}

View File

@ -1,9 +1,9 @@
[gd_scene load_steps=10 format=3 uid="uid://cq2s8oa1ql28l"]
[gd_scene load_steps=10 format=3 uid="uid://gldtxysavetf"]
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://logic-scenes/startup/start_frame.png" id="1_8giso"]
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="1_8giso"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="1_b01tw"]
[ext_resource type="Script" path="res://logic-scenes/startup/volume_sliders.gd" id="3_q2gbh"]
[ext_resource type="Texture2D" uid="uid://bwicl5q0lw06q" path="res://logic-scenes/startup/start_bottom.png" id="3_s5ssh"]
[ext_resource type="Texture2D" uid="uid://bwicl5q0lw06q" path="res://import/interface-elements/bottom.png" id="3_s5ssh"]
[sub_resource type="GDScript" id="GDScript_ia432"]
script/source = "extends TabContainer
@ -11,45 +11,45 @@ script/source = "extends TabContainer
var focus_list: Array
func _ready():
for child in get_children():
focus_list.append(_find_selectable_in(child))
for child in get_children():
focus_list.append(_find_selectable_in(child))
func _find_selectable_in(parent:Control):
if parent.focus_mode != FOCUS_NONE:
return parent
if parent.get_child_count() == 0:
return self
else:
for child in parent.get_children():
var ret = _find_selectable_in(child)
if not ret == self:
return ret
if parent.focus_mode != FOCUS_NONE:
return parent
if parent.get_child_count() == 0:
return self
else:
for child in parent.get_children():
var ret = _find_selectable_in(child)
if not ret == self:
return ret
func _unhandled_input(event):
if event.is_action_type():
if event.is_action_pressed(\"ui_left\"): previous()
elif event.is_action_pressed(\"ui_right\"): next()
if event.is_action_type():
if event.is_action_pressed(\"ui_left\"): previous()
elif event.is_action_pressed(\"ui_right\"): next()
func next():
if current_tab < get_tab_count()-1:
if !Input.is_action_just_released(\"mouse_left\"):
if not get_viewport().gui_get_focus_owner() == null:
focus_list[current_tab] = get_viewport().gui_get_focus_owner()
current_tab += 1
focus_list[current_tab].grab_focus()
else:
current_tab += 1
if current_tab < get_tab_count()-1:
if !Input.is_action_just_released(\"mouse_left\"):
if not get_viewport().gui_get_focus_owner() == null:
focus_list[current_tab] = get_viewport().gui_get_focus_owner()
current_tab += 1
focus_list[current_tab].grab_focus()
else:
current_tab += 1
func previous():
if current_tab > 0:
if !Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
if not get_viewport().gui_get_focus_owner() == null:
focus_list[current_tab] = get_viewport().gui_get_focus_owner()
current_tab -= 1
focus_list[current_tab].grab_focus()
else:
current_tab -= 1
if current_tab > 0:
if !Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
if not get_viewport().gui_get_focus_owner() == null:
focus_list[current_tab] = get_viewport().gui_get_focus_owner()
current_tab -= 1
focus_list[current_tab].grab_focus()
else:
current_tab -= 1
"
[sub_resource type="GDScript" id="GDScript_v567h"]

Binary file not shown.

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=7 format=3 uid="uid://befxf8uruwnrl"]
[gd_scene load_steps=8 format=3 uid="uid://befxf8uruwnrl"]
[ext_resource type="Texture2D" uid="uid://balmcptv73l2j" path="res://dev-util/menu_background.png" id="1_0oiki"]
[ext_resource type="PackedScene" uid="uid://cq2s8oa1ql28l" path="res://logic-scenes/startup/startup.tscn" id="1_v5rpm"]
[ext_resource type="PackedScene" uid="uid://gldtxysavetf" path="res://logic-scenes/startup/startup.tscn" id="1_v5rpm"]
[ext_resource type="PackedScene" uid="uid://b3b0gyvklqn50" path="res://base-environments/youth_room/youth_room.tscn" id="2_23ia3"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/messy.theme" id="3_8hrj7"]
[ext_resource type="Texture2D" uid="uid://d3ewjumh0b0g6" path="res://logic-scenes/main menu/logo.png" id="4_kslkj"]
[ext_resource type="Script" path="res://logic-scenes/main menu/Main Menu.gd" id="4_vj0j6"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_njt06"]
@ -22,6 +23,8 @@ texture = ExtResource("1_0oiki")
[node name="Startup Menu" parent="." instance=ExtResource("1_v5rpm")]
visible = false
[node name="youth room" parent="." instance=ExtResource("2_23ia3")]
[node name="Main Menu" type="Panel" parent="."]
anchors_preset = 15
anchor_right = 1.0
@ -30,6 +33,7 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_8hrj7")
theme_override_styles/panel = SubResource("StyleBoxEmpty_njt06")
script = ExtResource("4_vj0j6")
[node name="TextureRect" type="TextureRect" parent="Main Menu"]
layout_mode = 1
@ -61,7 +65,5 @@ grow_vertical = 2
layout_mode = 2
text = "new Game"
[node name="youth room" parent="." instance=ExtResource("2_23ia3")]
[connection signal="pressed" from="Main Menu/PanelContainer/Button" to="Main Menu" method="hide"]
[connection signal="pressed" from="Main Menu/PanelContainer/Button" to="youth room" method="start"]
[connection signal="pressed" from="Main Menu/PanelContainer/Button" to="Main Menu" method="hide"]

View File

@ -20,16 +20,32 @@ config/icon="res://icon.png"
State="*res://singletons/global_state.gd"
[debug]
gdscript/warnings/native_method_override=0
[display]
window/size/viewport_width=1440
window/size/viewport_height=1080
window/size/mode=3
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
mouse_cursor/custom_image="res://import/interface-elements/cursor.png"
[gui]
theme/custom="res://logic-scenes/themes/messy.theme"
[input]
ui_accept={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":4194309,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":4194310,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
]
}
player_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)

View File

@ -6,4 +6,60 @@ var simplified_navigation:bool = false
var enable_subtitles: bool = false
var reduce_motion: bool = false
var show_content_notes: bool = false
var show_prompts: bool = false
var provide_summaries: bool = false
var allow_skipping: bool = false
var focus_list:Array = []
var lock_focus: bool = false
# Intented for use when me wants focus for itself, can reclaim focus, thus dropping the stack that focused.
func request_focus_for(me: Object, reclaim: bool = false) -> bool:
if reclaim:
focus_list.front().has_focus = false
if focus_list.has(me):
while focus_list.pop_front() != me: break
me.has_focus = true
return me.has_focus
push_warning(me, " wanted to reclaim focus, but was not on list.")
return pass_focus_to(me)
# Element no longer wants focus, if Element itself is also dropped, this option can be chosen aswell.
func drop_focus(of:Object, dropObject: bool = false) -> bool:
if lock_focus or get_tree().paused:
push_error(of, " wanted to drop focus while it was locked or tree is paused.")
if not dropObject: of.has_focus = false
focus_list.erase(of)
focus_list.front().has_focus = true
return false
func get_current_focus(): return focus_list.front()
# Used to put a new target on top of the Focus Stack.
func pass_focus_to(target:Object) -> bool:
if "focus_forward" in target:
pass_focus_to(target.focus_forward)
if lock_focus or get_tree().paused:
push_error(target, " requested focus while it was locked or tree is paused.")
elif !is_instance_valid(target):
push_error("Focus instance not valid")
elif !"has_focus" in target:
push_error(target, " has no has focus method")
else:
if not focus_list.front() == null: focus_list.front().has_focus = false
target.has_focus = true
if target.has_focus:
focus_list.push_front(target)
assert(focus_list.size() < 100)
return true
return false
# Currently focused element loses focus, but remains in stack.
func free_focus():
if not focus_list.front() == null: focus_list.front().has_focus = false
func queue_for_focus(target: Object, index: int):
focus_list.insert(index, target)

View File

@ -1,30 +1,138 @@
[gd_scene load_steps=4 format=3 uid="uid://bdnesuqroi7ss"]
[gd_scene load_steps=12 format=3 uid="uid://bdnesuqroi7ss"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nbr3v"]
blend_mode = 1
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
[ext_resource type="Shader" path="res://vfx/particle_mixer.gdshader" id="1_i6oe2"]
[ext_resource type="Texture2D" uid="uid://dq7jm5ufknbb6" path="res://vfx/lens-flare-particle.png" id="2_h5y3k"]
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_d61lg"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lpenh"]
render_priority = 0
shader = ExtResource("1_i6oe2")
shader_parameter/particle_color = null
shader_parameter/particle_texture = ExtResource("2_h5y3k")
[sub_resource type="Gradient" id="Gradient_tjuvm"]
offsets = PackedFloat32Array(0, 0.50813, 1)
colors = PackedColorArray(1, 0.877403, 0.516545, 1, 0.94702, 0.505309, 0.59484, 1, 0.735853, 0.324231, 0.687053, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_d2t20"]
gradient = SubResource("Gradient_tjuvm")
[sub_resource type="Gradient" id="Gradient_c8r4y"]
offsets = PackedFloat32Array(0, 0.00813008, 0.52439, 1)
colors = PackedColorArray(0, 0, 0, 1, 0.0284553, 0.0284553, 0.0284553, 1, 0.244776, 0.244776, 0.244776, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_2vogp"]
gradient = SubResource("Gradient_c8r4y")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_eegys"]
emission_shape = 1
emission_sphere_radius = 1.0
emission_sphere_radius = 0.3
spread = 180.0
gravity = Vector3(0, 1, 0)
initial_velocity_min = 0.2
initial_velocity_max = 1.0
gravity = Vector3(0, 0.02, 0)
initial_velocity_max = 0.2
color_ramp = SubResource("GradientTexture1D_2vogp")
color_initial_ramp = SubResource("GradientTexture1D_d2t20")
turbulence_enabled = true
turbulence_noise_strength = 0.1
turbulence_noise_scale = 2.0
turbulence_noise_speed = Vector3(0.1, 0.3, 0.5)
turbulence_noise_speed_random = 0.3
turbulence_influence_min = 0.05
turbulence_influence_min = 0.01
turbulence_influence_max = 0.03
turbulence_initial_displacement_max = 1.0
[sub_resource type="Shader" id="Shader_p2314"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.0.stable's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_disabled;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable;
uniform float point_size : hint_range(0,128);
uniform float roughness : hint_range(0,1);
uniform sampler2D texture_metallic : hint_default_white,filter_linear_mipmap,repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r,filter_linear_mipmap,repeat_enable;
uniform float specular;
uniform float metallic;
uniform int particles_anim_h_frames;
uniform int particles_anim_v_frames;
uniform bool particles_anim_loop;
uniform vec4 backlight : source_color;
uniform sampler2D texture_backlight : hint_default_black,filter_linear_mipmap,repeat_enable;
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
UV=UV*uv1_scale.xy+uv1_offset.xy;
mat4 mat_world = mat4(normalize(INV_VIEW_MATRIX[0]), normalize(INV_VIEW_MATRIX[1]) ,normalize(INV_VIEW_MATRIX[2]), MODEL_MATRIX[3]);
mat_world = mat_world * mat4(vec4(cos(INSTANCE_CUSTOM.x), -sin(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
MODELVIEW_MATRIX = VIEW_MATRIX * mat_world;
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
float h_frames = float(particles_anim_h_frames);
float v_frames = float(particles_anim_v_frames);
float particle_total_frames = float(particles_anim_h_frames * particles_anim_v_frames);
float particle_frame = floor(INSTANCE_CUSTOM.z * float(particle_total_frames));
if (!particles_anim_loop) {
particle_frame = clamp(particle_frame, 0.0, particle_total_frames - 1.0);
} else {
particle_frame = mod(particle_frame, particle_total_frames);
}
UV /= vec2(h_frames, v_frames);
UV += vec2(mod(particle_frame, h_frames) / h_frames, floor((particle_frame + 0.5) / h_frames) / v_frames);
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
float metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel);
METALLIC = metallic_tex * metallic;
vec4 roughness_texture_channel = vec4(1.0,0.0,0.0,0.0);
float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
SPECULAR = specular;
vec3 backlight_tex = texture(texture_backlight,base_uv).rgb;
BACKLIGHT = (backlight.rgb+backlight_tex);
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fgrmi"]
render_priority = 0
shader = SubResource("Shader_p2314")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = Plane(1, 0, 0, 0)
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/particles_anim_h_frames = 1
shader_parameter/particles_anim_v_frames = 1
shader_parameter/particles_anim_loop = false
shader_parameter/backlight = Color(0, 0, 0, 1)
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/texture_albedo = ExtResource("2_h5y3k")
shader_parameter/texture_backlight = ExtResource("2_h5y3k")
[sub_resource type="QuadMesh" id="QuadMesh_ea2fp"]
material = SubResource("ShaderMaterial_fgrmi")
size = Vector2(0.1, 0.1)
[node name="collectable_particles" type="GPUParticles3D"]
material_override = SubResource("StandardMaterial3D_nbr3v")
amount = 30
material_override = SubResource("ShaderMaterial_lpenh")
cast_shadow = 0
amount = 50
lifetime = 10.0
process_material = SubResource("ParticleProcessMaterial_d61lg")
process_material = SubResource("ParticleProcessMaterial_eegys")
draw_pass_1 = SubResource("QuadMesh_ea2fp")

View File

@ -4,6 +4,7 @@ render_mode blend_add, specular_disabled;
uniform sampler2D particle_texture;
uniform vec4 particle_color : source_color;
uniform sampler2D DEPTH_TEXTURE: hint_depth_texture;
void vertex() {
mat4 mat_world = mat4(normalize(INV_VIEW_MATRIX[0]), normalize(INV_VIEW_MATRIX[1]) ,normalize(INV_VIEW_MATRIX[2]), MODEL_MATRIX[3]);
@ -14,9 +15,13 @@ void vertex() {
}
void fragment() {
ALBEDO = texture(particle_texture,UV/2.0).xyz * COLOR.xyz;
float depth = texture(DEPTH_TEXTURE, SCREEN_UV).r;
depth = PROJECTION_MATRIX[3][2] / (depth + PROJECTION_MATRIX[2][2]);
depth += VERTEX.z;
depth = max(0.0,min(1.0, (depth*10.0 - 0.1)));
ALBEDO = texture(particle_texture,UV/2.0).xyz * COLOR.xyz * depth;
EMISSION = ALBEDO/8.0;
BACKLIGHT = ALBEDO;
SPECULAR = 0.0;
SPECULAR = 0.0;
}