mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 07:45:33 +00:00
Elevators
This commit is contained in:
parent
929d993f99
commit
4fc136e5d7
39 changed files with 4471 additions and 264 deletions
0
3D/MapModels/.gdignore
Normal file
0
3D/MapModels/.gdignore
Normal file
BIN
3D/MapModels/Barrel3DModel.glb
Normal file
BIN
3D/MapModels/Barrel3DModel.glb
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
1123
3D/Maps/autosave/test.5.map
Normal file
1123
3D/Maps/autosave/test.5.map
Normal file
File diff suppressed because it is too large
Load diff
1172
3D/Maps/autosave/test.6.map
Normal file
1172
3D/Maps/autosave/test.6.map
Normal file
File diff suppressed because it is too large
Load diff
1182
3D/Maps/autosave/test.7.map
Normal file
1182
3D/Maps/autosave/test.7.map
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1112,3 +1112,76 @@
|
|||
"classname" "light_spot"
|
||||
"origin" "136 408 40"
|
||||
}
|
||||
// entity 10
|
||||
{
|
||||
"classname" "trigger_area"
|
||||
// brush 0
|
||||
{
|
||||
( 336 384 16 ) ( 336 385 16 ) ( 336 384 17 ) __TB_empty 0 0 0 1 1
|
||||
( 336 384 16 ) ( 336 384 17 ) ( 337 384 16 ) __TB_empty 16 0 0 1 1
|
||||
( 336 384 16 ) ( 337 384 16 ) ( 336 385 16 ) __TB_empty 16 0 0 1 1
|
||||
( 416 416 32 ) ( 416 417 32 ) ( 417 416 32 ) __TB_empty 16 0 0 1 1
|
||||
( 416 416 32 ) ( 417 416 32 ) ( 416 416 33 ) __TB_empty 16 0 0 1 1
|
||||
( 416 416 32 ) ( 416 416 33 ) ( 416 417 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
}
|
||||
// entity 11
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "312 232 40"
|
||||
}
|
||||
// entity 12
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "408 280 40"
|
||||
}
|
||||
// entity 13
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "408 168 40"
|
||||
}
|
||||
// entity 14
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "504 184 40"
|
||||
}
|
||||
// entity 15
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "376 104 40"
|
||||
}
|
||||
// entity 16
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "488 264 40"
|
||||
}
|
||||
// entity 17
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "488 328 40"
|
||||
}
|
||||
// entity 18
|
||||
{
|
||||
"classname" "light_omni"
|
||||
"origin" "488 408 40"
|
||||
}
|
||||
// entity 19
|
||||
{
|
||||
"classname" "actor_barrel_1"
|
||||
"origin" "184 504 24"
|
||||
}
|
||||
// entity 20
|
||||
{
|
||||
"classname" "actor_barrel_1"
|
||||
"origin" "184 520 24"
|
||||
}
|
||||
// entity 21
|
||||
{
|
||||
"classname" "actor_barrel_1"
|
||||
"origin" "184 536 24"
|
||||
}
|
||||
// entity 22
|
||||
{
|
||||
"classname" "actor_barrel_1"
|
||||
"origin" "232 536 24"
|
||||
}
|
||||
|
|
|
|||
22
3D/Scenes/Props/barrel_3d.tscn
Normal file
22
3D/Scenes/Props/barrel_3d.tscn
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c2enjjxlfb5or"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du8xcvbnf30o2" path="res://ExternalMaterial/Barrel/Barrels.png" id="1_2libs"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_2libs"]
|
||||
height = 0.564575
|
||||
radius = 0.321777
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 0
|
||||
|
||||
[node name="Barrel" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
|
||||
pixel_size = 0.05
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_2libs")
|
||||
hframes = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0376587, 0)
|
||||
shape = SubResource("CylinderShape3D_2libs")
|
||||
17
3D/Scenes/Props/elevator_3d.tscn
Normal file
17
3D/Scenes/Props/elevator_3d.tscn
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cq6tw87ei4by3"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_0vufj"]
|
||||
size = Vector3(1, 0.101501, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_wl3wm"]
|
||||
|
||||
[node name="Elevator" type="AnimatableBody3D"]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0038147, 0)
|
||||
shape = SubResource("BoxShape3D_0vufj")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.1, 0, 0, 0, 1, 0, 0, 0)
|
||||
mesh = SubResource("BoxMesh_wl3wm")
|
||||
skeleton = NodePath("../..")
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://2j6k1gmnqqps"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_gqx5a"]
|
||||
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="1_mixsm"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2enjjxlfb5or" path="res://3D/Scenes/Props/barrel_3d.tscn" id="2_5uiix"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_mixsm")
|
||||
scene_file = ExtResource("2_5uiix")
|
||||
apply_rotation_on_map_build = false
|
||||
apply_scale_on_map_build = false
|
||||
classname = "actor_barrel_1"
|
||||
description = "Explosive Barrel Type 1"
|
||||
func_godot_internal = false
|
||||
base_classes = Array[Resource]([ExtResource("1_gqx5a")])
|
||||
class_properties = {}
|
||||
class_property_descriptions = {}
|
||||
auto_apply_to_matching_node_properties = false
|
||||
meta_properties = {
|
||||
"model": "\"3D/MapModels/Barrel3DModel.glb\"",
|
||||
"size": AABB(-8, -8, -8, 8, 8, 8)
|
||||
}
|
||||
node_class = ""
|
||||
name_property = ""
|
||||
metadata/_custom_type_script = "uid://c83r7t467hm4m"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://jn17j3xk5f3m"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_opmpi"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2enjjxlfb5or" path="res://3D/Scenes/Props/barrel_3d.tscn" id="2_d6vd7"]
|
||||
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="3_t8pgb"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_t8pgb")
|
||||
scene_file = ExtResource("2_d6vd7")
|
||||
apply_rotation_on_map_build = false
|
||||
apply_scale_on_map_build = false
|
||||
classname = "actor_elevator_1"
|
||||
description = "Elevator Type 1"
|
||||
func_godot_internal = false
|
||||
base_classes = Array[Resource]([ExtResource("1_opmpi")])
|
||||
class_properties = {}
|
||||
class_property_descriptions = {}
|
||||
auto_apply_to_matching_node_properties = false
|
||||
meta_properties = {
|
||||
"model": "\"3D/MapModels/Barrel3DModel.glb\"",
|
||||
"size": AABB(-8, -8, -8, 8, 8, 8)
|
||||
}
|
||||
node_class = ""
|
||||
name_property = ""
|
||||
metadata/_custom_type_script = "uid://c83r7t467hm4m"
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDSolidClass" load_steps=4 format=3 uid="uid://cqyc33bbc701f"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://msq50x6rk4po" path="res://addons/func_godot/src/fgd/func_godot_fgd_solid_class.gd" id="1_oh5jt"]
|
||||
[ext_resource type="Resource" uid="uid://ermxog0n4mvn" path="res://3D/TrenchBroom/EntityDefinitions/base/trigger_base.tres" id="1_xcmav"]
|
||||
[ext_resource type="Script" uid="uid://dp6h7yqh8x1gv" path="res://3D/TrenchBroom/EntityScripts/Triggers/trigger_area.gd" id="3_5p7mv"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_oh5jt")
|
||||
spawn_type = 2
|
||||
origin_type = 4
|
||||
build_visuals = false
|
||||
use_in_baked_light = false
|
||||
shadow_casting_setting = 0
|
||||
build_occlusion = false
|
||||
render_layers = 0
|
||||
collision_shape_type = 1
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
collision_priority = 1.0
|
||||
collision_shape_margin = 0.04
|
||||
add_textures_metadata = false
|
||||
add_vertex_metadata = false
|
||||
add_face_position_metadata = false
|
||||
add_face_normal_metadata = false
|
||||
add_collision_shape_face_range_metadata = false
|
||||
script_class = ExtResource("3_5p7mv")
|
||||
classname = "trigger_area"
|
||||
description = "Area node that activates its target group when entered."
|
||||
func_godot_internal = false
|
||||
base_classes = Array[Resource]([ExtResource("1_xcmav")])
|
||||
class_properties = {}
|
||||
class_property_descriptions = {}
|
||||
auto_apply_to_matching_node_properties = false
|
||||
meta_properties = {
|
||||
"color": Color(0.8, 0, 0.8, 1)
|
||||
}
|
||||
node_class = "Area3D"
|
||||
name_property = ""
|
||||
metadata/_custom_type_script = "uid://msq50x6rk4po"
|
||||
46
3D/TrenchBroom/EntityScripts/Triggers/trigger_area.gd
Normal file
46
3D/TrenchBroom/EntityScripts/Triggers/trigger_area.gd
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@tool
|
||||
class_name TriggerArea
|
||||
extends Area3D
|
||||
|
||||
@export var target: String = ""
|
||||
@export var targetfunc: String = ""
|
||||
@export var targetname: String = ""
|
||||
|
||||
enum TriggerStates {
|
||||
READY,
|
||||
USED
|
||||
}
|
||||
var trigger_state: TriggerStates = TriggerStates.READY
|
||||
var timeout: float = 0.0
|
||||
var last_activator: Node = null
|
||||
|
||||
func _func_godot_apply_properties(props: Dictionary) -> void:
|
||||
target = props["target"] as String
|
||||
targetfunc = props["targetfunc"] as String
|
||||
targetname = props["targetname"] as String
|
||||
|
||||
func toggle_collision(toggle: bool) -> void:
|
||||
for child in get_children():
|
||||
if child is CollisionShape3D:
|
||||
child.set_deferred("disabled", !toggle)
|
||||
|
||||
func use() -> void:
|
||||
if trigger_state == TriggerStates.READY:
|
||||
trigger_state = TriggerStates.USED
|
||||
toggle_collision(false)
|
||||
TBGAME.use_targets(self, target)
|
||||
|
||||
func _on_ent_entered(ent: Node) -> void:
|
||||
if trigger_state == TriggerStates.READY:
|
||||
if ent.is_in_group("PLAYER"):
|
||||
call("use")
|
||||
|
||||
func _init() -> void:
|
||||
monitoring = true
|
||||
monitorable = false
|
||||
connect("body_entered", _on_ent_entered)
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
TBGAME.set_targetname(self, targetname)
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dp6h7yqh8x1gv
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=8 format=3 uid="uid://cxqi6r6nblcn3"]
|
||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=7 format=3 uid="uid://cxqi6r6nblcn3"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://nayxb8n7see2" path="res://addons/func_godot/fgd/phong_base.tres" id="1_24lxq"]
|
||||
[ext_resource type="Resource" uid="uid://onsfttdpojex" path="res://3D/TrenchBroom/fgd_base.tres" id="1_dlwdq"]
|
||||
[ext_resource type="Resource" uid="uid://dgkdkac8ppgnq" path="res://3D/TrenchBroom/fgd_solid.tres" id="2_bci5m"]
|
||||
[ext_resource type="Resource" uid="uid://bdji3873bg32h" path="res://addons/func_godot/fgd/worldspawn.tres" id="2_dlwdq"]
|
||||
[ext_resource type="Resource" uid="uid://b700sa4be6dfa" path="res://3D/TrenchBroom/fgd_point.tres" id="3_0gbih"]
|
||||
[ext_resource type="Resource" uid="uid://ch3e0dix85uhb" path="res://addons/func_godot/fgd/func_detail_illusionary.tres" id="5_7icdq"]
|
||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="7_m2ebq"]
|
||||
|
||||
[resource]
|
||||
|
|
@ -14,4 +13,4 @@ export_file = false
|
|||
target_map_editor = 1
|
||||
fgd_name = "FuncGodot"
|
||||
base_fgd_files = Array[Resource]([ExtResource("1_dlwdq"), ExtResource("2_bci5m"), ExtResource("3_0gbih")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_24lxq"), ExtResource("2_dlwdq"), ExtResource("5_7icdq")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_24lxq"), ExtResource("2_dlwdq")])
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=4 format=3 uid="uid://b700sa4be6dfa"]
|
||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=5 format=3 uid="uid://b700sa4be6dfa"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
|
||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
|
||||
[ext_resource type="Resource" uid="uid://ctrecvowhcqx0" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_spot.tres" id="2_u7uvb"]
|
||||
[ext_resource type="Resource" uid="uid://2j6k1gmnqqps" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_barrel.tres" id="3_u7uvb"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_lykim")
|
||||
|
|
@ -10,5 +11,5 @@ export_file = false
|
|||
target_map_editor = 1
|
||||
fgd_name = "FuncGodot"
|
||||
base_fgd_files = Array[Resource]([])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb")])
|
||||
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=6 format=3 uid="uid://dgkdkac8ppgnq"]
|
||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=7 format=3 uid="uid://dgkdkac8ppgnq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_jws5j"]
|
||||
[ext_resource type="Resource" uid="uid://cxy7jnh6d7msn" path="res://addons/func_godot/fgd/func_detail.tres" id="1_rbohd"]
|
||||
[ext_resource type="Resource" uid="uid://ch3e0dix85uhb" path="res://addons/func_godot/fgd/func_detail_illusionary.tres" id="2_1pqwq"]
|
||||
[ext_resource type="Resource" uid="uid://b70vf4t5dc70t" path="res://addons/func_godot/fgd/func_geo.tres" id="3_ire2f"]
|
||||
[ext_resource type="Resource" uid="uid://dg5x44cc7flew" path="res://addons/func_godot/fgd/func_illusionary.tres" id="4_h7bc3"]
|
||||
[ext_resource type="Resource" uid="uid://cqyc33bbc701f" path="res://3D/TrenchBroom/EntityDefinitions/solid/triggers/trigger_area.tres" id="5_1pqwq"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_jws5j")
|
||||
|
|
@ -12,5 +13,5 @@ export_file = false
|
|||
target_map_editor = 1
|
||||
fgd_name = "FuncGodot"
|
||||
base_fgd_files = Array[Resource]([])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3"), ExtResource("5_1pqwq")])
|
||||
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
BIN
ExternalMaterial/Barrel/Barrel3DModel.blend
Normal file
BIN
ExternalMaterial/Barrel/Barrel3DModel.blend
Normal file
Binary file not shown.
53
ExternalMaterial/Barrel/Barrel3DModel.blend.import
Normal file
53
ExternalMaterial/Barrel/Barrel3DModel.blend.import
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://u4lk0t54sqsa"
|
||||
path="res://.godot/imported/Barrel3DModel.blend-32ea1619c5dc483ffd7c9e85c880db2c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ExternalMaterial/Barrel/Barrel3DModel.blend"
|
||||
dest_files=["res://.godot/imported/Barrel3DModel.blend-32ea1619c5dc483ffd7c9e85c880db2c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
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=""
|
||||
_subresources={}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
BIN
ExternalMaterial/Barrel/Barrel3DModel.blend1
Normal file
BIN
ExternalMaterial/Barrel/Barrel3DModel.blend1
Normal file
Binary file not shown.
BIN
ExternalMaterial/Barrel/Barrel_Texture_Side.png
(Stored with Git LFS)
Normal file
BIN
ExternalMaterial/Barrel/Barrel_Texture_Side.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
ExternalMaterial/Barrel/Barrel_Texture_Side.png.import
Normal file
34
ExternalMaterial/Barrel/Barrel_Texture_Side.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnjxlg8abcdv2"
|
||||
path="res://.godot/imported/Barrel_Texture_Side.png-74bf0b1241234c3d209d87b7f68ef837.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ExternalMaterial/Barrel/Barrel_Texture_Side.png"
|
||||
dest_files=["res://.godot/imported/Barrel_Texture_Side.png-74bf0b1241234c3d209d87b7f68ef837.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=3
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
BIN
ExternalMaterial/Barrel/Barrel_Texture_Top.png
(Stored with Git LFS)
Normal file
BIN
ExternalMaterial/Barrel/Barrel_Texture_Top.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
ExternalMaterial/Barrel/Barrel_Texture_Top.png.import
Normal file
34
ExternalMaterial/Barrel/Barrel_Texture_Top.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dwvorpvhbetmm"
|
||||
path="res://.godot/imported/Barrel_Texture_Top.png-5a2b000f5a97c30c3fadf9f2a87d4143.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ExternalMaterial/Barrel/Barrel_Texture_Top.png"
|
||||
dest_files=["res://.godot/imported/Barrel_Texture_Top.png-5a2b000f5a97c30c3fadf9f2a87d4143.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=3
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
BIN
ExternalMaterial/Barrel/Barrel_Texture_UV.png
(Stored with Git LFS)
Normal file
BIN
ExternalMaterial/Barrel/Barrel_Texture_UV.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
ExternalMaterial/Barrel/Barrel_Texture_UV.png.import
Normal file
34
ExternalMaterial/Barrel/Barrel_Texture_UV.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cg3qywra3nqra"
|
||||
path="res://.godot/imported/Barrel_Texture_UV.png-02a319d38d3f0993bc189343c9120f65.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ExternalMaterial/Barrel/Barrel_Texture_UV.png"
|
||||
dest_files=["res://.godot/imported/Barrel_Texture_UV.png-02a319d38d3f0993bc189343c9120f65.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=3
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=53 format=3 uid="uid://ec4m3geediis"]
|
||||
[gd_scene load_steps=55 format=3 uid="uid://ec4m3geediis"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvisn0b641od4" path="res://addons/cyclops_level_builder/nodes/cyclops_block.gd" id="1_18fbr"]
|
||||
[ext_resource type="Script" uid="uid://ba0tf7ihw4hpp" path="res://Scripts/Misc/CameraController3D.cs" id="1_g4gcm"]
|
||||
|
|
@ -13,6 +13,8 @@
|
|||
[ext_resource type="Texture2D" uid="uid://du8xcvbnf30o2" path="res://ExternalMaterial/Barrel/Barrels.png" id="11_id3mo"]
|
||||
[ext_resource type="PackedScene" uid="uid://rimplblbptcd" path="res://Scenes/Actors/IsoPlayer_FSM.tscn" id="12_g4gcm"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8gtrjf2xeue7" path="res://3D/MapScenes/TestLevel.tscn" id="12_g83w3"]
|
||||
[ext_resource type="LabelSettings" uid="uid://buk3e7bbwmnv1" path="res://Resources/Styles/Hud_Text_Style.tres" id="14_lhprj"]
|
||||
[ext_resource type="Script" uid="uid://cwd3sksjqpuy3" path="res://Scripts/Utils/FpsCounterLabel.cs" id="15_joeuf"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_id3mo"]
|
||||
script = ExtResource("2_kler0")
|
||||
|
|
@ -463,3 +465,18 @@ script = ExtResource("1_g4gcm")
|
|||
MaxAimOffsetDistance = 16.0
|
||||
CameraOffset = Vector3(8, 12, 8)
|
||||
TargetPath = NodePath("../IsoPlayerFsm")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="FPS" type="Label" parent="CanvasLayer"]
|
||||
z_index = 20
|
||||
z_as_relative = false
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -40.0
|
||||
offset_bottom = 23.0
|
||||
grow_horizontal = 0
|
||||
text = "1234"
|
||||
label_settings = ExtResource("14_lhprj")
|
||||
script = ExtResource("15_joeuf")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=13 format=3 uid="uid://rimplblbptcd"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://rimplblbptcd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://88smibkin17p" path="res://Scripts/Components/FSM/3DPlayer/IsoPlayerFSMProxy.cs" id="1_cc7e7"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddwhrlrgj6i00" path="res://Sprites/Actors/Cirno.png" id="1_vex34"]
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
[ext_resource type="Script" uid="uid://eop2ue3otxcs" path="res://Scripts/Components/FSM/3DPlayer/IsoPlayerStorageModule.cs" id="6_habpy"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="7_4cdxq"]
|
||||
[ext_resource type="Script" uid="uid://c8ar11sg0su2h" path="res://Scripts/Components/FSM/3DPlayer/ShadowModule.cs" id="9_fg04g"]
|
||||
[ext_resource type="Script" uid="uid://bm73kgly8gv2i" path="res://Scripts/Components/FSM/3DPlayer/IsoInteractionController.cs" id="10_habpy"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fg04g"]
|
||||
radius = 0.349554
|
||||
|
|
@ -23,6 +24,9 @@ albedo_color = Color(0, 0, 0, 0.235294)
|
|||
[sub_resource type="QuadMesh" id="QuadMesh_fg04g"]
|
||||
material = SubResource("StandardMaterial3D_cc7e7")
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_habpy"]
|
||||
height = 0.679688
|
||||
|
||||
[node name="IsoPlayerFsm" type="CharacterBody3D" node_paths=PackedStringArray("PlayerFSM")]
|
||||
collision_layer = 2
|
||||
script = ExtResource("1_cc7e7")
|
||||
|
|
@ -36,7 +40,7 @@ script = ExtResource("2_3oyrx")
|
|||
|
||||
[node name="Active" type="Node" parent="StateMachine" node_paths=PackedStringArray("_moduleNodes")]
|
||||
script = ExtResource("3_cc7e7")
|
||||
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), NodePath("../../ShadowModule")]
|
||||
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), NodePath("../../ShadowModule"), NodePath("../../InteractionController")]
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
|
||||
|
|
@ -48,6 +52,7 @@ vframes = 4
|
|||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.101789, 0)
|
||||
visible = false
|
||||
shape = SubResource("CapsuleShape3D_fg04g")
|
||||
|
||||
[node name="MovementModule" type="Node" parent="." node_paths=PackedStringArray("PlayerStorage", "_inputProvider")]
|
||||
|
|
@ -77,3 +82,12 @@ script = ExtResource("9_fg04g")
|
|||
ShadowPath = NodePath("../Shadow")
|
||||
Shadow = NodePath("../Shadow")
|
||||
CollisionMask = 1
|
||||
|
||||
[node name="InteractionController" type="Area3D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
script = ExtResource("10_habpy")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractionController"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0410156, 0)
|
||||
shape = SubResource("CylinderShape3D_habpy")
|
||||
|
|
|
|||
16
Scenes/Interactable/AreaTrigger3D.tscn
Normal file
16
Scenes/Interactable/AreaTrigger3D.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://bhh7qq1plw53i"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://btyooucm1g70g" path="res://Scripts/Interactables/AreaTrigger3D.cs" id="1_stwr4"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_5x0x6"]
|
||||
|
||||
[node name="AreaTrigger3d" type="Area3D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_stwr4")
|
||||
OneTime = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("BoxShape3D_5x0x6")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
script = ExtResource("4_u1i8n")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_g20dv")]([ExtResource("3_6314l")])
|
||||
RemoveEquipment = Array[ExtResource("2_g20dv")]([])
|
||||
RemoveEquipment = []
|
||||
metadata/_custom_type_script = "uid://mja0rk7n2kln"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1tvdd"]
|
||||
|
|
|
|||
48
Scripts/Actors/Elevator3D.cs
Normal file
48
Scripts/Actors/Elevator3D.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
public partial class Elevator3D : PathFollow3D, IActivable
|
||||
{
|
||||
[Export] public float Speed { get; set; }
|
||||
|
||||
private bool _isMoving = false;
|
||||
private float _multiplier = 1f;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!_isMoving) return;
|
||||
|
||||
ProgressRatio += (Speed * (float)delta) * _multiplier;
|
||||
|
||||
if (ProgressRatio is >= 1 or <= 0)
|
||||
{
|
||||
_isMoving = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
if (_isMoving) return false;
|
||||
|
||||
StartMoving();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void StartMoving()
|
||||
{
|
||||
if (_isMoving) return;
|
||||
_isMoving = true;
|
||||
|
||||
if (ProgressRatio <= 0)
|
||||
{
|
||||
_multiplier = 1f;
|
||||
}
|
||||
else if (ProgressRatio >= 1)
|
||||
{
|
||||
_multiplier = -1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Scripts/Actors/Elevator3D.cs.uid
Normal file
1
Scripts/Actors/Elevator3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cyr7ypanl8drq
|
||||
53
Scripts/Components/FSM/3DPlayer/IsoInteractionController.cs
Normal file
53
Scripts/Components/FSM/3DPlayer/IsoInteractionController.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
||||
public partial class IsoInteractionController : Area3D, IModule<PlayerState, CharacterBody3D>
|
||||
{
|
||||
|
||||
private bool _enabled = false;
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get => _enabled;
|
||||
set
|
||||
{
|
||||
if (_enabled == value) return;
|
||||
_enabled = value;
|
||||
if (_enabled)
|
||||
{
|
||||
EmitSignal(SignalName.InteractionStarted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Signal]
|
||||
public delegate void InteractionStartedEventHandler();
|
||||
|
||||
public IStateMachine<PlayerState, CharacterBody3D> StateMachine { get; private set; }
|
||||
|
||||
public void EnterState(PlayerState state)
|
||||
{
|
||||
Enabled = true;
|
||||
}
|
||||
|
||||
public void ExitState(PlayerState state)
|
||||
{
|
||||
Enabled = false;
|
||||
}
|
||||
|
||||
public void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
||||
{
|
||||
StateMachine = machine;
|
||||
}
|
||||
|
||||
public void Process(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PhysicsProcess(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bm73kgly8gv2i
|
||||
72
Scripts/Interactables/AreaTrigger3D.cs
Normal file
72
Scripts/Interactables/AreaTrigger3D.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Interactables;
|
||||
|
||||
public partial class AreaTrigger3D : Area3D
|
||||
{
|
||||
[Export] public Node3D Target { get; set; }
|
||||
|
||||
[Export] public ActivationType ActivationType { get; set; } = Scripts.ActivationType.Toggle;
|
||||
|
||||
[Export] public bool OneTime { get; set; }
|
||||
[Export] public bool DoNotActivateOnFirst { get; set; }
|
||||
|
||||
private int _activations = 0;
|
||||
|
||||
[Signal]
|
||||
public delegate void ActivatedEventHandler();
|
||||
|
||||
private IsoInteractionController _cachedPlayer;
|
||||
|
||||
private bool Activate()
|
||||
{
|
||||
if (_activations == 0 && DoNotActivateOnFirst)
|
||||
{
|
||||
_activations++;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (OneTime && _activations > 0) return false;
|
||||
|
||||
if (Target != null)
|
||||
{
|
||||
if (Target is not IActivable target)
|
||||
{
|
||||
GD.PrintErr($"Target {Target.Name} is not activable");
|
||||
return false;
|
||||
}
|
||||
target.Activate(ActivationType);
|
||||
}
|
||||
|
||||
EmitSignal(nameof(Activated));
|
||||
|
||||
_activations++;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private void _on_area_entered(Area3D area)
|
||||
{
|
||||
if (area is not IsoInteractionController player) return;
|
||||
if (player.Enabled)
|
||||
{
|
||||
Activate();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cachedPlayer = player;
|
||||
_cachedPlayer.InteractionStarted += PlayerOnInteractionStarted;
|
||||
}
|
||||
}
|
||||
|
||||
private void PlayerOnInteractionStarted()
|
||||
{
|
||||
Activate();
|
||||
if (_cachedPlayer != null)
|
||||
{
|
||||
_cachedPlayer.InteractionStarted -= PlayerOnInteractionStarted;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Scripts/Interactables/AreaTrigger3D.cs.uid
Normal file
1
Scripts/Interactables/AreaTrigger3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://btyooucm1g70g
|
||||
|
|
@ -50,6 +50,7 @@ GlobalState="*res://Scripts/GlobalState.cs"
|
|||
GodotGTweensContextNode="*res://GTweensGodot/Godot/Source/Contexts/GodotGTweensContextNode.cs"
|
||||
CyclopsAutoload="*res://addons/cyclops_level_builder/cyclops_global_scene.tscn"
|
||||
PoolingManager="*res://Scenes/Utils/pooling_manager.tscn"
|
||||
TBGAME="*res://3D/TrenchBroom/EntityScripts/tb_manager.gd"
|
||||
|
||||
[dialogic]
|
||||
|
||||
|
|
@ -379,11 +380,15 @@ locale/translations=PackedStringArray("res://Dialogue/Translations/dialogic_char
|
|||
2d_navigation/layer_2="Solid"
|
||||
3d_physics/layer_2="Player"
|
||||
2d_physics/layer_3="items"
|
||||
3d_physics/layer_3="Trigger"
|
||||
2d_physics/layer_4="bullets"
|
||||
3d_physics/layer_4="Bullets"
|
||||
2d_physics/layer_5="enemies"
|
||||
3d_physics/layer_5="Props"
|
||||
2d_physics/layer_6="shoot-through"
|
||||
2d_physics/layer_7="solid-actors"
|
||||
2d_physics/layer_8="EnemyBullets"
|
||||
3d_physics/layer_8="EnemyBullets"
|
||||
2d_physics/layer_9="Acid"
|
||||
2d_physics/layer_10="Conveyor"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue