1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-22 15:54:20 +00:00
pineapple-surf/player/Player.tscn

269 lines
7.8 KiB
Text
Raw Normal View History

2023-01-08 20:46:19 +00:00
[gd_scene load_steps=16 format=3 uid="uid://b5i1sqd88wlle"]
2023-01-07 17:38:31 +00:00
[ext_resource type="Script" path="res://player/Player.gd" id="1_rujcr"]
2023-01-07 11:09:08 +00:00
[ext_resource type="Script" path="res://player/Head.gd" id="2_ohlgu"]
[ext_resource type="Script" path="res://player/OnHand.gd" id="3_3rcjl"]
2023-01-08 01:25:48 +00:00
[ext_resource type="Theme" uid="uid://c5a1nyqumj46j" path="res://menu/menu_theme.tres" id="4_d7ru6"]
2023-01-07 11:09:08 +00:00
[ext_resource type="Shader" path="res://player/crosshair.gdshader" id="4_dut1p"]
2023-01-08 22:13:46 +00:00
[ext_resource type="PackedScene" uid="uid://bj4d3a0jxgvpu" path="res://island/CanSplash.tscn" id="6_la1ga"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aqp8x"]
metallic_specular = 0.0
[sub_resource type="CylinderMesh" id="CylinderMesh_h7ca4"]
material = SubResource("StandardMaterial3D_aqp8x")
[sub_resource type="CylinderShape3D" id="CylinderShape3D_otair"]
radius = 0.48
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vqko1"]
bg_color = Color(0.240234, 0.240234, 0.240234, 1)
[sub_resource type="Theme" id="Theme_smyke"]
Panel/styles/panel = SubResource("StyleBoxFlat_vqko1")
[sub_resource type="GDScript" id="GDScript_iiadi"]
resource_name = "FPS_Counter"
script/source = "extends Label
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
self.text = str(round(1/delta)) + \" FPS\"
"
[sub_resource type="GDScript" id="GDScript_5d122"]
resource_name = "PointsSpawner"
script/source = "extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func spawn_points_label(text: String, offset: Vector2):
var label = Label.new()
label.text = text
label.offset_bottom = -offset.y
label.offset_left = offset.x
self.add_child(label)
var initialY = label.position.y
var tween = get_tree().create_tween()
tween.set_speed_scale(2)
tween.parallel().tween_property(label, \"position:y\", initialY - 50, 1).as_relative().from_current().set_trans(Tween.EASE_OUT)
tween.parallel().tween_property(label, \"modulate\", Color.TRANSPARENT, 1).set_trans(Tween.EASE_OUT)
tween.tween_callback(label.queue_free)
tween.play()
"
[sub_resource type="GDScript" id="GDScript_7qy62"]
script/source = "extends Camera3D
@export var MainCamera: Camera3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
2023-01-08 15:44:18 +00:00
func _physics_process(delta):
if not MainCamera:
return
if MainCamera.global_position:
self.global_position = MainCamera.global_position
if MainCamera.global_rotation:
self.global_rotation = MainCamera.global_rotation
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2p6rt"]
2023-01-07 11:09:08 +00:00
shader = ExtResource("4_dut1p")
shader_parameter/center_enabled = false
shader_parameter/legs_enabled = true
2023-01-07 13:54:15 +00:00
shader_parameter/inverted = false
shader_parameter/color_id = 0
2023-01-07 13:54:15 +00:00
shader_parameter/color_0 = Vector4(1, 1, 1, 1)
shader_parameter/color_1 = Quaternion(1, 0, 0, 1)
shader_parameter/color_2 = Quaternion(0, 0, 1, 1)
shader_parameter/center_radius = 0.005
shader_parameter/width = 0.001
shader_parameter/len = 0.008
shader_parameter/spacing = 0.006
shader_parameter/spread = 0.902
[node name="Player" type="CharacterBody3D"]
2023-01-08 12:49:22 +00:00
collision_layer = 5
slide_on_ceiling = false
floor_constant_speed = true
script = ExtResource("1_rujcr")
[node name="Head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.54, 0)
2023-01-07 11:09:08 +00:00
script = ExtResource("2_ohlgu")
[node name="RayCast3D" type="RayCast3D" parent="Head"]
target_position = Vector3(0, 0, -1.4)
[node name="OnHand" type="Node3D" parent="Head"]
transform = Transform3D(1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 0, 0)
2023-01-07 11:09:08 +00:00
script = ExtResource("3_3rcjl")
[node name="Viewport" type="Control" parent="Head"]
texture_filter = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CameraViewportContainer" type="SubViewportContainer" parent="Head/Viewport"]
2023-01-08 17:39:37 +00:00
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true
[node name="GameViewport" type="SubViewport" parent="Head/Viewport/CameraViewportContainer"]
handle_input_locally = false
2023-01-08 06:41:28 +00:00
audio_listener_enable_3d = true
2023-01-07 17:38:31 +00:00
size = Vector2i(284, 160)
render_target_update_mode = 4
[node name="Camera" type="Camera3D" parent="Head/Viewport/CameraViewportContainer/GameViewport"]
transform = Transform3D(1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 0.54, 0)
cull_mask = 1048573
current = true
fov = 80.0
near = 0.001
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("CylinderMesh_h7ca4")
skeleton = NodePath("../..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CylinderShape3D_otair")
[node name="HUD" type="Control" parent="."]
2023-01-07 17:38:31 +00:00
texture_filter = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = SubResource("Theme_smyke")
[node name="FPS_Label" type="Label" parent="HUD"]
visible = false
2023-01-08 17:39:37 +00:00
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -97.0
offset_bottom = 32.0
grow_horizontal = 0
theme_override_font_sizes/font_size = 20
text = "n/d FPS"
horizontal_alignment = 2
script = SubResource("GDScript_iiadi")
[node name="PointsSpawner" type="Control" parent="HUD"]
2023-01-08 17:39:37 +00:00
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
script = SubResource("GDScript_5d122")
2023-01-08 01:25:48 +00:00
[node name="AmmoLabel" type="Label" parent="HUD"]
2023-01-08 17:39:37 +00:00
layout_mode = 1
2023-01-08 01:25:48 +00:00
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -103.0
offset_top = -26.0
offset_right = -8.0
offset_bottom = -8.0
2023-01-08 01:25:48 +00:00
grow_horizontal = 0
grow_vertical = 0
theme = ExtResource("4_d7ru6")
theme_override_font_sizes/font_size = 16
text = "8888 seeds left"
horizontal_alignment = 2
vertical_alignment = 2
[node name="BackBufferCopy2" type="BackBufferCopy" parent="HUD"]
position = Vector2(727, 447)
scale = Vector2(7.61, 4.89)
copy_mode = 2
2023-01-08 01:25:48 +00:00
metadata/_edit_lock_ = true
[node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"]
2023-01-08 17:39:37 +00:00
modulate = Color(1, 0.596078, 1, 1)
show_behind_parent = true
2023-01-08 17:39:37 +00:00
z_index = 4096
z_as_relative = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true
2023-01-08 17:39:37 +00:00
metadata/_edit_lock_ = true
[node name="SubViewport" type="SubViewport" parent="HUD/SubViewportContainer"]
transparent_bg = true
handle_input_locally = false
size = Vector2i(284, 160)
2023-01-08 15:44:18 +00:00
render_target_update_mode = 4
[node name="WeaponCamera" type="Camera3D" parent="HUD/SubViewportContainer/SubViewport" node_paths=PackedStringArray("MainCamera")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.581502, 0)
2023-01-08 17:39:37 +00:00
cull_mask = 2
fov = 80.0
near = 0.001
script = SubResource("GDScript_7qy62")
MainCamera = NodePath("../../../../Head/Viewport/CameraViewportContainer/GameViewport/Camera")
[node name="Crosshair" type="ColorRect" parent="HUD"]
material = SubResource("ShaderMaterial_2p6rt")
2023-01-08 17:39:37 +00:00
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
2023-01-08 01:25:48 +00:00
metadata/_edit_lock_ = true
[node name="BackBufferCopy" type="BackBufferCopy" parent="HUD"]
visible = false
y_sort_enabled = true
position = Vector2(140, 79)
scale = Vector2(1.65, 1)
2023-01-08 01:25:48 +00:00
metadata/_edit_lock_ = true
[node name="RigidDynamicBody3D" type="RigidBody3D" parent="."]
2023-01-07 18:23:07 +00:00
2023-01-08 22:13:46 +00:00
[node name="CanSplash" parent="." instance=ExtResource("6_la1ga")]
[connection signal="splashed" from="CanSplash" to="." method="respawn"]