Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c7abeb0d9 | |||
| 97828ecdda |
Binary file not shown.
File diff suppressed because one or more lines are too long
28
assets/lift/lift.gd
Normal file
28
assets/lift/lift.gd
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
extends Node3D
|
||||||
|
|
||||||
|
var lift_already_used : bool = false
|
||||||
|
|
||||||
|
@export var end_location : Vector3 = Vector3.ZERO
|
||||||
|
@export var lift_time : float = 1.0
|
||||||
|
|
||||||
|
@onready var button: MeshInstance3D = $Cylinder_001
|
||||||
|
|
||||||
|
func start_climbing() -> void:
|
||||||
|
var elevator_tween = get_tree().create_tween()
|
||||||
|
elevator_tween.set_ease(Tween.EASE_IN_OUT)
|
||||||
|
elevator_tween.set_trans(Tween.TRANS_CUBIC)
|
||||||
|
elevator_tween.tween_property(self, "global_position", end_location, lift_time)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||||
|
if lift_already_used:
|
||||||
|
return
|
||||||
|
|
||||||
|
if is_instance_of(body, CharacterBody3D):
|
||||||
|
lift_already_used = true
|
||||||
|
|
||||||
|
var button_tween = get_tree().create_tween()
|
||||||
|
var button_final_pos = button.global_position + Vector3.DOWN * 0.35
|
||||||
|
button_tween.tween_property(button, "global_position", button_final_pos, 0.3)
|
||||||
|
button_tween.tween_callback(start_climbing)
|
||||||
|
|
||||||
1
assets/lift/lift.gd.uid
Normal file
1
assets/lift/lift.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c1w84vh3bqijr
|
||||||
BIN
assets/lift/lift.glb
Normal file
BIN
assets/lift/lift.glb
Normal file
Binary file not shown.
42
assets/lift/lift.glb.import
Normal file
42
assets/lift/lift.glb.import
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://cc2vcuaulfks3"
|
||||||
|
path="res://.godot/imported/lift.glb-e7e66d0f097e30a0a067073f130adce8.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/lift/lift.glb"
|
||||||
|
dest_files=["res://.godot/imported/lift.glb-e7e66d0f097e30a0a067073f130adce8.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/root_script=null
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_name_suffixes=true
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
materials/extract=0
|
||||||
|
materials/extract_format=0
|
||||||
|
materials/extract_path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=2
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
33
assets/lift/lift.tscn
Normal file
33
assets/lift/lift.tscn
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=16 format=3 uid="uid://dmkw8cmalm5k"]
|
[gd_scene load_steps=17 format=3 uid="uid://dmkw8cmalm5k"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
|
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
|
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://f8cvr5s041ej" path="res://assets/audio/ambiance/637083__nox_sound__ambiance_nature_night_cricket_calm_loop_stereo.wav" id="10_eca4n"]
|
[ext_resource type="AudioStream" uid="uid://f8cvr5s041ej" path="res://assets/audio/ambiance/637083__nox_sound__ambiance_nature_night_cricket_calm_loop_stereo.wav" id="10_eca4n"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dip6cce5gtwi8" path="res://assets/greyboxing/guard_tower.tscn" id="11_wctvs"]
|
[ext_resource type="PackedScene" uid="uid://dip6cce5gtwi8" path="res://assets/greyboxing/guard_tower.tscn" id="11_wctvs"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c066hc7yu36wx" path="res://assets/water/water.tscn" id="12_i2xii"]
|
[ext_resource type="PackedScene" uid="uid://c066hc7yu36wx" path="res://assets/water/water.tscn" id="12_i2xii"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://gir68sk3762e" path="res://assets/lift/lift.tscn" id="13_eca4n"]
|
||||||
|
|
||||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_feb1n"]
|
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_feb1n"]
|
||||||
panorama = ExtResource("2_ruo5i")
|
panorama = ExtResource("2_ruo5i")
|
||||||
@@ -28,10 +29,11 @@ tonemap_mode = 4
|
|||||||
ssao_enabled = true
|
ssao_enabled = true
|
||||||
ssil_enabled = true
|
ssil_enabled = true
|
||||||
sdfgi_use_occlusion = true
|
sdfgi_use_occlusion = true
|
||||||
fog_light_color = Color(1, 1, 1, 1)
|
fog_enabled = true
|
||||||
fog_density = 0.001
|
fog_light_color = Color(0.9955967, 0.83634025, 0.69151855, 1)
|
||||||
fog_sky_affect = 0.121
|
fog_sun_scatter = 0.5
|
||||||
volumetric_fog_enabled = true
|
fog_density = 0.002
|
||||||
|
fog_sky_affect = 0.184
|
||||||
volumetric_fog_density = 0.004
|
volumetric_fog_density = 0.004
|
||||||
volumetric_fog_emission = Color(1, 1, 1, 1)
|
volumetric_fog_emission = Color(1, 1, 1, 1)
|
||||||
volumetric_fog_anisotropy = 0.6
|
volumetric_fog_anisotropy = 0.6
|
||||||
@@ -39,7 +41,7 @@ volumetric_fog_anisotropy = 0.6
|
|||||||
[node name="Main" type="Node3D"]
|
[node name="Main" type="Node3D"]
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("1_2vsi6")]
|
[node name="Player" parent="." instance=ExtResource("1_2vsi6")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -13.104848, -53.52949, 71.105316)
|
transform = Transform3D(0.9481796, 0, -0.31773496, 0, 1, 0, 0.31773496, 0, 0.9481796, -4.1827703, -33.37261, 18.473116)
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
environment = SubResource("Environment_1bvp3")
|
environment = SubResource("Environment_1bvp3")
|
||||||
@@ -77,3 +79,8 @@ pause = ExtResource("10_0ari0")
|
|||||||
|
|
||||||
[node name="BackgroundMusicPlayer" parent="." instance=ExtResource("9_i2xii")]
|
[node name="BackgroundMusicPlayer" parent="." instance=ExtResource("9_i2xii")]
|
||||||
stream = ExtResource("10_eca4n")
|
stream = ExtResource("10_eca4n")
|
||||||
|
|
||||||
|
[node name="Lift" parent="." instance=ExtResource("13_eca4n")]
|
||||||
|
transform = Transform3D(0.9961947, 0, -0.08715574, 0, 1, 0, 0.08715574, 0, 0.9961947, -4.393, 1.693, 0.583)
|
||||||
|
end_location = Vector3(-4.393, 115, 0.583)
|
||||||
|
lift_time = 10.0
|
||||||
|
|||||||
Reference in New Issue
Block a user