Compare commits

...

2 Commits

4 changed files with 20 additions and 21 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
[ext_resource type="Script" uid="uid://c7khr6oist3ku" path="res://Scripts/Camera3d.cs" id="3_u44n3"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_u44n3"]
load_path = "res://.godot/imported/Background.png-e8880a50f4091751eaed728281d3c21e.s3tc.ctex"
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_u44n3"]
panorama = SubResource("CompressedTexture2D_u44n3")
@@ -30,7 +29,7 @@ transform = Transform3D(1, 0, 0, 0, 0.89061797, 0.45475236, 0, -0.45475236, 0.89
script = ExtResource("2_xkndl")
[node name="Camera3D" type="Camera3D" parent="." unique_id=161504606]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 30, 20, 30)
transform = Transform3D(1, 0, 0, 0, 0.25881907, 0.9659258, 0, -0.9659258, 0.25881907, 30, 20, 30)
current = true
script = ExtResource("3_u44n3")
+1 -1
View File
@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://ck10wk10me3tx"]
[ext_resource type="Script" uid="uid://dkg0vq75koeig" path="res://Scripts/Helpers/Layer.cs" id="1_trar1"]
[ext_resource type="Script" path="res://Scripts/Helpers/Layer.cs" id="1_trar1"]
[node name="Node3D" type="Node3D" unique_id=724642284]
script = ExtResource("1_trar1")
+7 -8
View File
@@ -20,21 +20,20 @@ public partial class Camera3d : Camera3D
_mouseDelta = Vector2.Zero;
Vector3 direction = Vector3.Zero;
if (Input.IsActionPressed("move_forward")&& Position.Z > 0) direction += Transform.Basis.Z;
if (Input.IsActionPressed("move_backward")&& Position.Z < layerSize * 4) direction -= Transform.Basis.Z;
if (Input.IsActionPressed("move_forward") && Position.Z > 0) direction += Transform.Basis.Z;
if (Input.IsActionPressed("move_backward") && Position.Z < layerSize * 4) direction -= Transform.Basis.Z;
if (Input.IsActionPressed("move_left") && Position.X > 0) direction -= Transform.Basis.X;
if (Input.IsActionPressed("move_right") && Position.X < layerSize * 4) direction += Transform.Basis.X;
if (direction != Vector3.Zero)
{
direction = direction.Normalized() * (Speed + 3 * Mathf.Log(Position.Y) + 1) * d;
direction = direction.Normalized() * Speed * (Input.IsActionPressed("sprint") ? 2.5f : 1) * d;
Translate(direction);
}
if (Input.IsActionJustPressed("zoom_in") && Position.Y > 10)
Translate(Transform.Basis.Y * ScrollStrength);
if (Input.IsActionJustPressed("zoom_out") && Position.Y < 50)
Translate(-Transform.Basis.Y * ScrollStrength);
if (Position.Y != 10 - visibleLayer * 4)
{
Position = new Vector3(Position.X, 10 - visibleLayer * 4, Position.Z);
}
}
}
+11 -10
View File
@@ -19,6 +19,12 @@ run/main_scene="uid://cgsmfi2s51cbd"
config/features=PackedStringArray("4.6", "C#", "Forward Plus")
config/icon="res://icon.svg"
[display]
window/size/mode=2
window/size/initial_position_type=3
window/size/borderless=true
[dotnet]
project/assembly_name="RuinAdventurer"
@@ -49,16 +55,6 @@ move_right={
"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
]
}
zoom_in={
"deadzone": 0.2,
"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":4,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
zoom_out={
"deadzone": 0.2,
"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":5,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
layer_up={
"deadzone": 0.2,
"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":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
@@ -69,6 +65,11 @@ layer_down={
"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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}
sprint={
"deadzone": 0.2,
"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":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[layer_names]