Add a walkie talkie

This commit is contained in:
Spencer Killen 2022-12-04 18:23:46 -07:00
parent cee84f3999
commit 13c962b8f6
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
26 changed files with 2509 additions and 1 deletions

BIN
blends/textures/rust1.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/walkie_talkie.blend (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,3 @@
source_md5="75918cb365f443f9c31ae57d5c8dfdc2"
dest_md5="ba659a4c88bfda4039dfca99a4dbe767"

View File

@ -0,0 +1,3 @@
source_md5="4146d95f0bc43e5d786b00eba919e7f2"
dest_md5="003f4c75cccc817e23c95dcb1363458a"

View File

@ -0,0 +1,3 @@
source_md5="2890a472bb2f254a03442b53585c6aa4"
dest_md5="20117a84f31475fb95aae085c6b0fc5d"

BIN
godot/assets/models/walkie_talkie/LCDScreen.material (Stored with Git LFS) Normal file

Binary file not shown.

BIN
godot/assets/models/walkie_talkie/MetalBody.material (Stored with Git LFS) Normal file

Binary file not shown.

BIN
godot/assets/models/walkie_talkie/WalkieTalkieBodyRust.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/WalkieTalkieBodyRust.png-3c78d60c63d15c500426e653c1fda602.s3tc.stex"
path.etc2="res://.import/WalkieTalkieBodyRust.png-3c78d60c63d15c500426e653c1fda602.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}
[deps]
source_file="res://assets/models/walkie_talkie/WalkieTalkieBodyRust.png"
dest_files=[ "res://.import/WalkieTalkieBodyRust.png-3c78d60c63d15c500426e653c1fda602.s3tc.stex", "res://.import/WalkieTalkieBodyRust.png-3c78d60c63d15c500426e653c1fda602.etc2.stex" ]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=1
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
godot/assets/models/walkie_talkie/WalkieTalkieKnob.material (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
extends Spatial
var active = false
onready var fsm: AnimationNodeStateMachinePlayback = $Animations/AnimationTree.get("parameters/playback")
func toggle():
if active:
fsm.travel("WalkieTalkieLeave")
else:
fsm.start("WalkieTalkieEnter")
active = not active
func put_away():
fsm.travel("WalkieTalkieLeave")
if $DestroyTimer.is_stopped():
$DestroyTimer.start(1)
func _process(_delta):
if Input.is_action_just_pressed("toggle_walkie_talkie"):
toggle()

BIN
godot/assets/models/walkie_talkie/walkie_talkie.glb (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,8 @@ dof_blur_near_enabled = true
dof_blur_near_distance = 1.33
dof_blur_near_amount = 0.66
dof_blur_near_quality = 2
glow_enabled = true
glow_bloom = 1.0
[node name="WorldEnvironment" type="WorldEnvironment"]
environment = SubResource( 3 )

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=2]
[gd_scene load_steps=19 format=2]
[ext_resource path="res://player/CameraController.gd" type="Script" id=1]
[ext_resource path="res://player/OnFootPhysics.gd" type="Script" id=2]
@ -13,6 +13,7 @@
[ext_resource path="res://player/HighSpeedFOV.gd" type="Script" id=11]
[ext_resource path="res://player/Overlay.gd" type="Script" id=12]
[ext_resource path="res://assets/BloodMush.png" type="Texture" id=13]
[ext_resource path="res://assets/models/walkie_talkie/walkie_talkie.tscn" type="PackedScene" id=14]
[sub_resource type="AnimationNodeStateMachine" id=2]
@ -50,10 +51,13 @@ root_node = NodePath("../CameraAnimationFSM")
[node name="Flashlight" parent="Smoothing/CameraController/Rotation/Camera" instance=ExtResource( 8 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00211835, 0 )
light_cull_mask = 4294966783
[node name="HighSpeedFOV" type="Node" parent="Smoothing/CameraController/Rotation/Camera"]
script = ExtResource( 11 )
[node name="WalkieTalkie" parent="Smoothing/CameraController/Rotation/Camera" instance=ExtResource( 14 )]
[node name="OnFootPhysics" type="KinematicBody" parent="."]
script = ExtResource( 2 )

View File

@ -209,6 +209,12 @@ player_look_left={
"events": [ Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":2,"axis_value":-1.0,"script":null)
]
}
toggle_walkie_talkie={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":67,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
]
}
[mono]

View File

@ -0,0 +1,27 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://player/player.tscn" type="PackedScene" id=1]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=2]
[ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=3]
[sub_resource type="CubeMesh" id=1]
[sub_resource type="ConcavePolygonShape" id=2]
data = PoolVector3Array( -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1 )
[node name="Spatial" type="Spatial"]
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 3.24543, 0, 0, 0, 1, 0, 0, 0, 3.31245, 0, -1.10092, 0 )
mesh = SubResource( 1 )
[node name="StaticBody" type="StaticBody" parent="MeshInstance"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"]
shape = SubResource( 2 )
[node name="Player" parent="." instance=ExtResource( 1 )]
[node name="WorldEnvironment" parent="." instance=ExtResource( 3 )]
[node name="shader" parent="." instance=ExtResource( 2 )]