1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-25 09:14:18 +00:00
pineapple-surf/player/Player.tscn

265 lines
7.7 KiB
Text

[gd_scene load_steps=16 format=3 uid="uid://b5i1sqd88wlle"]
[ext_resource type="Script" path="res://player/Player.gd" id="1_rujcr"]
[ext_resource type="Script" path="res://player/Head.gd" id="2_ohlgu"]
[ext_resource type="Script" path="res://player/OnHand.gd" id="3_3rcjl"]
[ext_resource type="Theme" uid="uid://c5a1nyqumj46j" path="res://menu/menu_theme.tres" id="4_d7ru6"]
[ext_resource type="Shader" path="res://player/crosshair.gdshader" id="4_dut1p"]
[ext_resource type="PackedScene" uid="uid://dc147tdie7oem" path="res://player/SplashController.tscn" id="6_hf66s"]
[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.
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"]
shader = ExtResource("4_dut1p")
shader_parameter/center_enabled = false
shader_parameter/legs_enabled = true
shader_parameter/inverted = false
shader_parameter/color_id = 0
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"]
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)
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)
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"]
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
audio_listener_enable_3d = true
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="."]
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
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"]
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")
[node name="AmmoLabel" type="Label" parent="HUD"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -106.0
offset_top = -35.0
grow_horizontal = 0
grow_vertical = 0
theme = ExtResource("4_d7ru6")
theme_override_font_sizes/font_size = 16
text = "asdfasdf"
horizontal_alignment = 1
vertical_alignment = 1
[node name="BackBufferCopy2" type="BackBufferCopy" parent="HUD"]
position = Vector2(727, 447)
scale = Vector2(7.61, 4.89)
copy_mode = 2
metadata/_edit_lock_ = true
[node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"]
modulate = Color(1, 0.596078, 1, 1)
show_behind_parent = true
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
metadata/_edit_lock_ = true
[node name="SubViewport" type="SubViewport" parent="HUD/SubViewportContainer"]
transparent_bg = true
handle_input_locally = false
size = Vector2i(284, 160)
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)
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")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
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)
metadata/_edit_lock_ = true
[node name="RigidDynamicBody3D" type="RigidBody3D" parent="."]
[node name="SplashController" parent="." instance=ExtResource("6_hf66s")]
target_path = NodePath("..")