Update crosshair.png, crosshair.png.import, StartingRoom.tscn, and 7 more files
This commit is contained in:
parent
cc3e77a595
commit
40e4281fd4
10 changed files with 283 additions and 278 deletions
BIN
Assets/crosshair.png
Normal file
BIN
Assets/crosshair.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,001 B |
34
Assets/crosshair.png.import
Normal file
34
Assets/crosshair.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://buafet16thf3p"
|
||||
path="res://.godot/imported/crosshair.png-7bed3294e640fe9ca357247b0602b756.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/crosshair.png"
|
||||
dest_files=["res://.godot/imported/crosshair.png-7bed3294e640fe9ca357247b0602b756.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
|
||||
68
Levels/StartingRoom.tscn
Normal file
68
Levels/StartingRoom.tscn
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
46
Scripts/ChronoManager.gd
Normal file
46
Scripts/ChronoManager.gd
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
extends Node3D
|
||||
# this is basically the level manager
|
||||
|
||||
signal broadcast(command : String)
|
||||
|
||||
@export_group("Variables")
|
||||
@export var level_tick : float = 1 # how often to run a command
|
||||
@export var level_time : float = 10 # the amoutn of time allowed for the level
|
||||
@export var commands : Array[String]
|
||||
@export_group("Node References")
|
||||
@export var gui : Control
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
while(commands.size() < level_time / level_tick): # prevent index out of bounds error
|
||||
commands.append("")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func set_command(position : int, command : String):
|
||||
commands[position] = command
|
||||
|
||||
func start_room():
|
||||
# open door
|
||||
# start timers
|
||||
# start running commands
|
||||
#hide crosshair
|
||||
pass
|
||||
|
||||
func reset_room():
|
||||
# run if timer expires, resets puzzle
|
||||
pass
|
||||
|
||||
func finish_room():
|
||||
# called when player reaches exit
|
||||
pass
|
||||
|
||||
func open_termimal():
|
||||
gui.terminal_panel.visible = true
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
#display terminal ui
|
||||
pass
|
||||
|
|
@ -2,6 +2,7 @@ extends CharacterBody3D
|
|||
|
||||
@export var camera : Camera3D
|
||||
@export var mouse_sensitivity : float = 0.003 # TODO: this is sketchy check that its framerate independant pls
|
||||
@export var raycast : RayCast3D
|
||||
|
||||
const SPEED = 5.0
|
||||
const JUMP_VELOCITY = 4.5
|
||||
|
|
@ -28,6 +29,10 @@ func _physics_process(delta):
|
|||
else:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
# interact with stuff
|
||||
if Input.is_action_just_pressed("interact"):
|
||||
print(raycast.)
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var input_dir = Input.get_vector("mov_left", "mov_right", "mov_up", "mov_down")
|
||||
|
|
|
|||
17
Scripts/gui.gd
Normal file
17
Scripts/gui.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends Control
|
||||
|
||||
@export_group("Node References")
|
||||
@export var terminal_panel : Control
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func close_terminal():
|
||||
terminal_panel.visible = false
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
79
gui.tscn
Normal file
79
gui.tscn
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bnlexkofp68gv"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/gui.gd" id="1_7s0l7"]
|
||||
[ext_resource type="Texture2D" uid="uid://buafet16thf3p" path="res://Assets/crosshair.png" id="1_mpwvh"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_lrnc3"]
|
||||
font_color = Color(1, 0, 0, 1)
|
||||
|
||||
[node name="Gui" type="Control" node_paths=PackedStringArray("terminal_panel")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_7s0l7")
|
||||
terminal_panel = NodePath("Terminal")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "Time: 10"
|
||||
label_settings = SubResource("LabelSettings_lrnc3")
|
||||
|
||||
[node name="Crosshair" 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="TextureRect" type="TextureRect" parent="Crosshair"]
|
||||
modulate = Color(1, 1, 1, 0.486275)
|
||||
custom_minimum_size = Vector2(10, 10)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_mpwvh")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Terminal" type="Control" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Terminal"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 200
|
||||
theme_override_constants/margin_top = 75
|
||||
theme_override_constants/margin_right = 200
|
||||
theme_override_constants/margin_bottom = 75
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Terminal/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Terminal/MarginContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Terminal/MarginContainer/PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Terminal UI"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CloseButton" type="Button" parent="Terminal/MarginContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 0
|
||||
text = "X"
|
||||
|
||||
[connection signal="pressed" from="Terminal/MarginContainer/PanelContainer/CloseButton" to="." method="close_terminal"]
|
||||
28
player.tscn
Normal file
28
player.tscn
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://d34smep2ukq7w"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Player.gd" id="1_tc5d2"]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_5q2rg"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_a6eig"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("camera", "raycast")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.83982, 0)
|
||||
script = ExtResource("1_tc5d2")
|
||||
camera = NodePath("Camera3D")
|
||||
mouse_sensitivity = null
|
||||
raycast = NodePath("Camera3D/RayCast3D")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("CapsuleMesh_5q2rg")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.621505, 0)
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
|
||||
target_position = Vector3(0, -4, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_a6eig")
|
||||
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="Chrono Chamber"
|
||||
run/main_scene="res://Levels/TestZone.tscn"
|
||||
run/main_scene="res://Levels/StartingRoom.tscn"
|
||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
|
@ -47,6 +47,11 @@ esc={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
interact={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue