Add watch framework
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://csmfxg011xisf"]
|
[gd_scene load_steps=10 format=3 uid="uid://csmfxg011xisf"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dopyfulbw2mx5" path="res://player/player.gd" id="1_ulp21"]
|
[ext_resource type="Script" uid="uid://dopyfulbw2mx5" path="res://player/player.gd" id="1_ulp21"]
|
||||||
[ext_resource type="PackedScene" uid="uid://caons6q8u2qt2" path="res://player/player.blend" id="2_3c3w1"]
|
[ext_resource type="PackedScene" uid="uid://caons6q8u2qt2" path="res://player/player.blend" id="2_3c3w1"]
|
||||||
[ext_resource type="PackedScene" uid="uid://k6jhk4snc3je" path="res://player/head.blend" id="3_wnvi2"]
|
[ext_resource type="PackedScene" uid="uid://k6jhk4snc3je" path="res://player/head.blend" id="3_wnvi2"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://xnd2p4kstsfw" path="res://player/watch/watch.tscn" id="4_83hs8"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ehsmr"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ehsmr"]
|
||||||
radius = 0.153372
|
radius = 0.153372
|
||||||
@@ -48,6 +49,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.144889, 0)
|
|||||||
|
|
||||||
[node name="head" parent="Neck" instance=ExtResource("3_wnvi2")]
|
[node name="head" parent="Neck" instance=ExtResource("3_wnvi2")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.222076, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.222076, 0)
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
shape = SubResource("CapsuleShape3D_ehsmr")
|
shape = SubResource("CapsuleShape3D_ehsmr")
|
||||||
@@ -89,3 +91,6 @@ text = "Username"
|
|||||||
replication_config = SubResource("SceneReplicationConfig_ulp21")
|
replication_config = SubResource("SceneReplicationConfig_ulp21")
|
||||||
|
|
||||||
[node name="Mesh" parent="." instance=ExtResource("2_3c3w1")]
|
[node name="Mesh" parent="." instance=ExtResource("2_3c3w1")]
|
||||||
|
|
||||||
|
[node name="Watch" parent="." instance=ExtResource("4_83hs8")]
|
||||||
|
transform = Transform3D(0.707107, 0.707107, -2.03718e-08, -0.183013, 0.183013, -0.965926, -0.683013, 0.683013, 0.258819, -0.228015, 0.33104, -0.235279)
|
||||||
|
|||||||
@@ -1,27 +1,40 @@
|
|||||||
class_name Player extends CharacterBody3D
|
class_name Player extends CharacterBody3D
|
||||||
|
|
||||||
@export_category("Player")
|
@export_category("Player Ailments")
|
||||||
|
@export_range(0, 100, 1.0) var health: int = 100
|
||||||
|
@export_range(0, 100, 1.0) var toxicity: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var burns: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var physical_trauma: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var hunger: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var thirst: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var insanity: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var drowning: int = 0
|
||||||
|
|
||||||
|
@export_category("Player Physics/Attributes")
|
||||||
@export_range(1, 35, 1) var speed: float = 5.0
|
@export_range(1, 35, 1) var speed: float = 5.0
|
||||||
@export_range(10, 400, 1) var acceleration: float = 100.0
|
@export_range(10, 400, 1) var acceleration: float = 100.0
|
||||||
|
|
||||||
@export_range(0.1, 3.0, 0.1) var jump_height: float = 1.0
|
@export_range(0.1, 3.0, 0.1) var jump_height: float = 1.0
|
||||||
@export_range(0.1, 3.0, 0.1, "or_greater") var camera_sens: float = 1.0
|
@export_range(0.1, 3.0, 0.1, "or_greater") var camera_sens: float = 1.0
|
||||||
@export_range(0.1, 3.0, 0.1, "or_greater") var joystick_camera_sens_multiplier: float = 5.0
|
@export_range(0.1, 3.0, 0.1, "or_greater") var joystick_camera_sens_multiplier: float = 5.0
|
||||||
|
|
||||||
|
@export_category("Node References")
|
||||||
@export var camera: Camera3D
|
@export var camera: Camera3D
|
||||||
@export var neck: Node3D
|
@export var neck: Node3D
|
||||||
@export var body: Node3D
|
@export var body: Node3D
|
||||||
@export var head: Node3D
|
@export var head: Node3D
|
||||||
|
@export var watch_face: MeshInstance3D
|
||||||
|
|
||||||
|
|
||||||
var jumping: bool = false
|
var jumping: bool = false
|
||||||
var is_using_joystick: bool = false
|
var is_using_joystick: bool = false
|
||||||
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
|
|
||||||
|
|
||||||
var move_dir: Vector2 # Input direction for movement
|
var move_dir: Vector2 # Input direction for movement
|
||||||
var look_dir: Vector2 # Input direction for look/aim
|
var look_dir: Vector2 # Input direction for look/aim
|
||||||
var walk_vel: Vector3 # Walking velocity
|
var walk_vel: Vector3 # Walking velocity
|
||||||
var grav_vel: Vector3 # Gravity velocity
|
var grav_vel: Vector3 # Gravity velocity
|
||||||
var jump_vel: Vector3 # Jumping velocity
|
var jump_vel: Vector3 # Jumping velocity
|
||||||
|
var gravity: float = 9.8 # Gravity
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|||||||
BIN
splunk/player/watch/textures/circular_progress_bar.png
Normal file
BIN
splunk/player/watch/textures/circular_progress_bar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d04873hiusc6i"
|
||||||
|
path="res://.godot/imported/circular_progress_bar.png-f4eb6f895796c7c677474f1ff35715a5.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://player/watch/textures/circular_progress_bar.png"
|
||||||
|
dest_files=["res://.godot/imported/circular_progress_bar.png-f4eb6f895796c7c677474f1ff35715a5.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
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=1
|
||||||
BIN
splunk/player/watch/textures/circular_progress_bar_outline.png
Normal file
BIN
splunk/player/watch/textures/circular_progress_bar_outline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bc8il5eibx7u1"
|
||||||
|
path="res://.godot/imported/circular_progress_bar_outline.png-f21aab2517811e4994f100e74ba10c8f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://player/watch/textures/circular_progress_bar_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/circular_progress_bar_outline.png-f21aab2517811e4994f100e74ba10c8f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
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=1
|
||||||
BIN
splunk/player/watch/watch.blend
Normal file
BIN
splunk/player/watch/watch.blend
Normal file
Binary file not shown.
53
splunk/player/watch/watch.blend.import
Normal file
53
splunk/player/watch/watch.blend.import
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://cwjrbynrbn6fh"
|
||||||
|
path="res://.godot/imported/watch.blend-326c3df72c7fa85f5cf7e4436b5992fc.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://player/watch/watch.blend"
|
||||||
|
dest_files=["res://.godot/imported/watch.blend-326c3df72c7fa85f5cf7e4436b5992fc.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
splunk/player/watch/watch.blend1
Normal file
BIN
splunk/player/watch/watch.blend1
Normal file
Binary file not shown.
11
splunk/player/watch/watch.gd
Normal file
11
splunk/player/watch/watch.gd
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
extends Node3D
|
||||||
|
|
||||||
|
@export_category("Watch Properties")
|
||||||
|
@export_range(0, 100, 1.0) var health: int = 100
|
||||||
|
@export_range(0, 100, 1.0) var toxicity: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var burns: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var physical_trauma: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var hunger: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var thirst: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var insanity: int = 0
|
||||||
|
@export_range(0, 100, 1.0) var drowning: int = 0
|
||||||
1
splunk/player/watch/watch.gd.uid
Normal file
1
splunk/player/watch/watch.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://pte5bmcl0pup
|
||||||
35
splunk/player/watch/watch.tscn
Normal file
35
splunk/player/watch/watch.tscn
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://xnd2p4kstsfw"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cwjrbynrbn6fh" path="res://player/watch/watch.blend" id="1_aow76"]
|
||||||
|
[ext_resource type="Script" uid="uid://pte5bmcl0pup" path="res://player/watch/watch.gd" id="1_kkuxj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ifoxqwmyx5pj" path="res://player/watch/watch_interface.tscn" id="3_5wyi7"]
|
||||||
|
|
||||||
|
[sub_resource type="ViewportTexture" id="ViewportTexture_tq7ns"]
|
||||||
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_vnrqh"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
shading_mode = 0
|
||||||
|
albedo_texture = SubResource("ViewportTexture_tq7ns")
|
||||||
|
uv1_scale = Vector3(20.675, 20.675, 20.675)
|
||||||
|
|
||||||
|
[sub_resource type="PlaneMesh" id="PlaneMesh_5wyi7"]
|
||||||
|
|
||||||
|
[node name="Watch" type="Node3D"]
|
||||||
|
script = ExtResource("1_kkuxj")
|
||||||
|
|
||||||
|
[node name="watch" parent="." instance=ExtResource("1_aow76")]
|
||||||
|
|
||||||
|
[node name="WatchFace" parent="watch" index="1"]
|
||||||
|
surface_material_override/0 = SubResource("StandardMaterial3D_vnrqh")
|
||||||
|
|
||||||
|
[node name="SubViewport" type="SubViewport" parent="."]
|
||||||
|
|
||||||
|
[node name="WatchInterface" parent="SubViewport" instance=ExtResource("3_5wyi7")]
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.39069, 0, 0)
|
||||||
|
mesh = SubResource("PlaneMesh_5wyi7")
|
||||||
|
surface_material_override/0 = SubResource("StandardMaterial3D_vnrqh")
|
||||||
|
|
||||||
|
[editable path="watch"]
|
||||||
32
splunk/player/watch/watch_interface.tscn
Normal file
32
splunk/player/watch/watch_interface.tscn
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://ifoxqwmyx5pj"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://oe0bmfcnckx8" path="res://player/watch/watch_interface_theme.tres" id="1_b0s04"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d04873hiusc6i" path="res://player/watch/textures/circular_progress_bar.png" id="2_rvv3g"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bc8il5eibx7u1" path="res://player/watch/textures/circular_progress_bar_outline.png" id="3_rvv3g"]
|
||||||
|
|
||||||
|
[node name="WatchInterface" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="TextureProgressBar" type="TextureProgressBar" parent="CenterContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_b0s04")
|
||||||
|
value = 78.0
|
||||||
|
fill_mode = 4
|
||||||
|
texture_under = ExtResource("2_rvv3g")
|
||||||
|
texture_over = ExtResource("3_rvv3g")
|
||||||
|
texture_progress = ExtResource("2_rvv3g")
|
||||||
|
tint_under = Color(0.444843, 0.444843, 0.444843, 1)
|
||||||
|
tint_progress = Color(1, 0.35, 0.35, 1)
|
||||||
3
splunk/player/watch/watch_interface_theme.tres
Normal file
3
splunk/player/watch/watch_interface_theme.tres
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[gd_resource type="Theme" format=3 uid="uid://oe0bmfcnckx8"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
Reference in New Issue
Block a user