Added contract screens

This commit is contained in:
jonathan
2026-02-01 11:49:45 +01:00
parent 4344b3b194
commit 9e6d4e5272
30 changed files with 528 additions and 19 deletions
+32
View File
@@ -0,0 +1,32 @@
extends MeshInstance3D
var isOnScreen:bool = false
@onready var camera_char: Camera3D = $"../Character/Head/Camera"
@onready var camera_screen: Camera3D = $Camera3D
@onready var screen: MeshInstance3D = $screen
@export var screens: Array
@export var new_screen: Texture2D
var current_screen = 0
func _input(event: InputEvent) -> void:
if event.is_action_pressed("fly_cam"):
isOnScreen = !isOnScreen
if isOnScreen:
camera_char.current = false
camera_screen.current = true
else:
camera_char.current = true
camera_screen.current = false
if event.is_action_pressed("next_screen"):
current_screen += 1
current_screen %= screens.size()
var mat:StandardMaterial3D = screen.mesh.surface_get_material(0)
mat.emission_texture = screens[current_screen]
if event.is_action_pressed("new_contract"):
var mat:StandardMaterial3D = screen.mesh.surface_get_material(0)
mat.emission_texture = new_screen
+1
View File
@@ -0,0 +1 @@
uid://bysnkaditp712
+35 -17
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=50 format=4 uid="uid://157h04x0krfu"]
[gd_scene load_steps=58 format=4 uid="uid://157h04x0krfu"]
[ext_resource type="PackedScene" uid="uid://bjufextny1icg" path="res://models/UndertakerAssets.glb" id="1_7dqbv"]
[ext_resource type="ArrayMesh" uid="uid://iitrxdpdaq0i" path="res://models/ceiling.res" id="1_jn645"]
@@ -29,8 +29,16 @@
[ext_resource type="ArrayMesh" uid="uid://dtaqp7ru2gi8d" path="res://models/button.res" id="25_2ftkj"]
[ext_resource type="Script" uid="uid://b22xrvio2577x" path="res://scenes/coffin_slide_fire.gd" id="27_ny2il"]
[ext_resource type="ArrayMesh" uid="uid://vtl7yxfd4hhq" path="res://models/main_screen.res" id="28_gjarb"]
[ext_resource type="Texture2D" uid="uid://dn4nke1qvik3k" path="res://screens/contract-1.png" id="29_5o3hq"]
[ext_resource type="Script" uid="uid://bysnkaditp712" path="res://scenes/main_screen.gd" id="29_1wmww"]
[ext_resource type="Texture2D" uid="uid://bqkfnastii3yn" path="res://screens/contract-1.png" id="29_5o3hq"]
[ext_resource type="Texture2D" uid="uid://7s837i2pg2t4" path="res://screens/contract-2_NEW_2.png" id="30_1wmww"]
[ext_resource type="Texture2D" uid="uid://h5naigo8j1vd" path="res://screens/contract-2.png" id="31_3aavd"]
[ext_resource type="Texture2D" uid="uid://cu7scka2pb3de" path="res://models/UndertakerAssets_T_Body.png" id="31_7r6do"]
[ext_resource type="Texture2D" uid="uid://onaokww40a3o" path="res://screens/contract-3.png" id="32_frp7b"]
[ext_resource type="Texture2D" uid="uid://bwpo8ojkhgsr5" path="res://screens/contract-4.png" id="33_yo4w0"]
[ext_resource type="Texture2D" uid="uid://8xpvoty8w3g6" path="res://screens/contract-5.png" id="34_wg1up"]
[ext_resource type="Texture2D" uid="uid://cin2sxy6ypjji" path="res://screens/NO-contract.png" id="35_wkj6l"]
[ext_resource type="Texture2D" uid="uid://cn7yi35kntfwt" path="res://screens/LAST-contract.png" id="36_ns543"]
[sub_resource type="BoxShape3D" id="BoxShape3D_vfrn5"]
size = Vector3(50, 1, 50)
@@ -186,8 +194,6 @@ _data = {
&"RESET": SubResource("Animation_mc3m6")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_ny2il"]
[sub_resource type="Animation" id="Animation_yggoe"]
resource_name = "CoffinSlideFire"
length = 2.0
@@ -223,10 +229,12 @@ _data = {
&"RESET": SubResource("Animation_2ulci")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_ny2il"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7r6do"]
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission_texture = ExtResource("29_5o3hq")
emission_texture = ExtResource("30_1wmww")
[sub_resource type="QuadMesh" id="QuadMesh_5o3hq"]
material = SubResource("StandardMaterial3D_7r6do")
@@ -447,12 +455,14 @@ debug_fill = false
[node name="Character" parent="." instance=ExtResource("5_3j2fx")]
transform = Transform3D(-1.0392305, 0, -0.5999999, 0, 1.1999999, 0, 0.5999999, 0, -1.0392305, 0, 0.02320534, 0)
[node name="Camera" parent="Character/Head" index="0"]
current = true
[node name="Lever" parent="." instance=ExtResource("6_dynfe")]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -1.9271023, 1.3349965, 2.5290997)
[node name="CoffinOpenable" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278)
visible = false
script = ExtResource("20_mc3m6")
[node name="ArmsAnimationPivot" type="Node3D" parent="CoffinOpenable"]
@@ -507,18 +517,9 @@ transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.0
mesh = ExtResource("20_2ulci")
skeleton = NodePath("../../..")
[node name="Button" type="MeshInstance3D" parent="."]
transform = Transform3D(0, 1, 0, 0, 0, -1, -1, 0, 0, 3.0767944, 1.0443684, 1.5089626)
mesh = ExtResource("25_2ftkj")
skeleton = NodePath("")
[node name="Interactable" parent="Button" instance=ExtResource("3_w68ji")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Button/Interactable"]
shape = SubResource("SphereShape3D_ny2il")
[node name="CoffinSlideFire" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278)
visible = false
script = ExtResource("27_ny2il")
[node name="Liftarms2" type="MeshInstance3D" parent="CoffinSlideFire"]
@@ -542,15 +543,31 @@ transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.0
mesh = ExtResource("20_2ulci")
skeleton = NodePath("../../..")
[node name="Button" type="MeshInstance3D" parent="."]
transform = Transform3D(0, 1, 0, 0, 0, -1, -1, 0, 0, 3.0767944, 1.0443684, 1.5089626)
mesh = ExtResource("25_2ftkj")
skeleton = NodePath("")
[node name="Interactable" parent="Button" instance=ExtResource("3_w68ji")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Button/Interactable"]
shape = SubResource("SphereShape3D_ny2il")
[node name="Main_Screen" type="MeshInstance3D" parent="."]
transform = Transform3D(1.5972348, 0, 0, 0, 1.5972348, 0, 0, 0, 1, 0, 2.7943075, 3.1311016)
transform = Transform3D(1.292, 0, 0, 0, 1.292, 0, 0, 0, 0.809, 0, 2.5756757, 3.1311016)
mesh = ExtResource("28_gjarb")
skeleton = NodePath("")
script = ExtResource("29_1wmww")
screens = [ExtResource("29_5o3hq"), ExtResource("31_3aavd"), ExtResource("32_frp7b"), ExtResource("33_yo4w0"), ExtResource("34_wg1up"), ExtResource("35_wkj6l"), ExtResource("36_ns543")]
new_screen = ExtResource("30_1wmww")
[node name="screen" type="MeshInstance3D" parent="Main_Screen"]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0.014483929, -0.015537739)
mesh = SubResource("QuadMesh_5o3hq")
[node name="Camera3D" type="Camera3D" parent="Main_Screen"]
transform = Transform3D(-0.7739938, 0, -4.2368985e-08, 0, 0.7739938, 0, 6.766468e-08, 0, -1.2360939, 0, 0, -1.1665173)
[node name="Misc" type="Node" parent="."]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Misc"]
@@ -704,3 +721,4 @@ skin = SubResource("Skin_cbukb")
[connection signal="on_hit" from="Button/Interactable" to="CoffinSlideFire" method="_on_interactable_on_hit"]
[editable path="UndertakerAssets"]
[editable path="Character"]