Compare commits
No commits in common. "91f939d9fcae2489d84af20ab9bb0b875ef905b1" and "d02bb3df47f331ebb0636da2311a4bc96f73fed1" have entirely different histories.
91f939d9fc
...
d02bb3df47
6 changed files with 10 additions and 78 deletions
|
@ -15,7 +15,7 @@
|
||||||
[node name="RotationalSprite" type="Sprite3D" parent="."]
|
[node name="RotationalSprite" type="Sprite3D" parent="."]
|
||||||
billboard = 2
|
billboard = 2
|
||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("8_snoby")
|
texture = ExtResource("9_83myg")
|
||||||
script = ExtResource("2_hmq60")
|
script = ExtResource("2_hmq60")
|
||||||
rotations = Dictionary[float, Texture2D]({
|
rotations = Dictionary[float, Texture2D]({
|
||||||
0.0: ExtResource("6_d1vpv"),
|
0.0: ExtResource("6_d1vpv"),
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://d23028pr0jahr"]
|
[gd_scene load_steps=3 format=3 uid="uid://d23028pr0jahr"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bgnb01j1nphhi" path="res://base/scenes/rooms/test.tscn" id="1_sjeh3"]
|
[ext_resource type="PackedScene" uid="uid://bgnb01j1nphhi" path="res://base/scenes/rooms/test.tscn" id="1_sjeh3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dwx5tcatj35gu" path="res://base/scenes/player.tscn" id="2_uxs03"]
|
[ext_resource type="PackedScene" uid="uid://dwx5tcatj35gu" path="res://base/scenes/player.tscn" id="2_uxs03"]
|
||||||
[ext_resource type="PackedScene" uid="uid://twqkevpn0q1a" path="res://base/scenes/enemies/test_enemy.tscn" id="3_tk4w0"]
|
|
||||||
|
|
||||||
[node name="Game" type="Node3D"]
|
[node name="Game" type="Node3D"]
|
||||||
|
|
||||||
[node name="Test Room" parent="." instance=ExtResource("1_sjeh3")]
|
[node name="Test Room" parent="." instance=ExtResource("1_sjeh3")]
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("2_uxs03")]
|
[node name="Player" parent="." instance=ExtResource("2_uxs03")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.208048, 1.61008)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.208048, 0)
|
||||||
|
|
||||||
[node name="TestEnemy" parent="." instance=ExtResource("3_tk4w0")]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.695979)
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://dwx5tcatj35gu"]
|
[gd_scene load_steps=10 format=3 uid="uid://dwx5tcatj35gu"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dts8lbivkgsmj" path="res://base/scripts/player/player.gd" id="1_1w3ab"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cf7avgppv4kfk" path="res://base/assets/guns/placeholder/static.png" id="1_7s1wv"]
|
[ext_resource type="Texture2D" uid="uid://cf7avgppv4kfk" path="res://base/assets/guns/placeholder/static.png" id="1_7s1wv"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cfw6p5g680c55" path="res://base/assets/guns/placeholder/shoot1.png" id="2_7ptt8"]
|
[ext_resource type="Texture2D" uid="uid://cfw6p5g680c55" path="res://base/assets/guns/placeholder/shoot1.png" id="2_7ptt8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bwfkjfpk4dwx0" path="res://base/assets/guns/placeholder/shoot2.png" id="3_1w3ab"]
|
[ext_resource type="Texture2D" uid="uid://bwfkjfpk4dwx0" path="res://base/assets/guns/placeholder/shoot2.png" id="3_1w3ab"]
|
||||||
|
@ -64,18 +63,13 @@ _data = {
|
||||||
&"static": SubResource("Animation_ma1q3")
|
&"static": SubResource("Animation_ma1q3")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody3D"]
|
[node name="Player" type="RigidBody3D"]
|
||||||
collision_layer = 2
|
|
||||||
collision_mask = 3
|
|
||||||
platform_wall_layers = 1
|
|
||||||
script = ExtResource("1_1w3ab")
|
|
||||||
|
|
||||||
[node name="Collider" type="CollisionShape3D" parent="."]
|
[node name="Collider" type="CollisionShape3D" parent="."]
|
||||||
shape = SubResource("CapsuleShape3D_jjqxs")
|
shape = SubResource("CapsuleShape3D_jjqxs")
|
||||||
|
|
||||||
[node name="Camera" type="Camera3D" parent="."]
|
[node name="Camera" type="Camera3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||||
current = true
|
|
||||||
|
|
||||||
[node name="HUD" type="CanvasLayer" parent="."]
|
[node name="HUD" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
[node name="Test Room" type="Node3D"]
|
[node name="Test Room" type="Node3D"]
|
||||||
|
|
||||||
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
|
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
|
||||||
use_collision = true
|
|
||||||
collision_mask = 2
|
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"]
|
[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.165546, -1.07088, 0.522302)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.165546, -1.07088, 0.522302)
|
||||||
|
|
|
@ -1,40 +1,12 @@
|
||||||
extends CharacterBody3D
|
extends RigidBody3D
|
||||||
|
|
||||||
@export var speed = 100.0
|
|
||||||
@export var fall_acceleration = 75.0
|
|
||||||
@export var vertical_sensivity = 0.005
|
|
||||||
@export var horizontal_sensivity = 0.005
|
|
||||||
|
|
||||||
var stack: CommandStack = CommandStack.new()
|
var stack: CommandStack = CommandStack.new()
|
||||||
|
|
||||||
@onready var camera: Camera3D = $"Camera"
|
|
||||||
@onready var weapon_player: AnimationPlayer = $"HUD/Weapon/AnimationPlayer"
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
weapon_player.current_animation = "static"
|
pass # Replace with function body.
|
||||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _physics_process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
var direction = Vector3.ZERO
|
pass
|
||||||
direction.z = Input.get_axis("move_forward", "move_backward")
|
|
||||||
direction.x = Input.get_axis("move_left", "move_right")
|
|
||||||
var target_velocity = (transform.basis * direction).normalized() * speed * delta
|
|
||||||
|
|
||||||
if not is_on_floor():
|
|
||||||
target_velocity.y -= fall_acceleration * delta
|
|
||||||
|
|
||||||
velocity = target_velocity
|
|
||||||
move_and_slide()
|
|
||||||
|
|
||||||
func _input(event):
|
|
||||||
if event is InputEventMouseMotion:
|
|
||||||
var new_rotation = clamp(
|
|
||||||
camera.rotation.x - event.relative.y * vertical_sensivity,
|
|
||||||
-PI/2,
|
|
||||||
PI/2
|
|
||||||
)
|
|
||||||
camera.rotation.x = new_rotation
|
|
||||||
rotation.y -= event.relative.x * horizontal_sensivity
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Revenge of the Red Dragon Pon of the Red Dragon Pon of the Red Dragon Pon"
|
config/name="Revenge of the Red Dragon Pon of the Red Dragon Pon of the Red Dragon Pon"
|
||||||
run/main_scene="uid://d23028pr0jahr"
|
run/main_scene="uid://bxf4x8hp870i6"
|
||||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
@ -19,34 +19,6 @@ config/icon="res://icon.svg"
|
||||||
|
|
||||||
project/assembly_name="Revenge of the Red Dragon Pon of the Red Dragon Pon of the Red Dragon Pon"
|
project/assembly_name="Revenge of the Red Dragon Pon of the Red Dragon Pon of the Red Dragon Pon"
|
||||||
|
|
||||||
[input]
|
|
||||||
|
|
||||||
move_forward={
|
|
||||||
"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
move_backward={
|
|
||||||
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
move_left={
|
|
||||||
"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
move_right={
|
|
||||||
"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
[layer_names]
|
|
||||||
|
|
||||||
3d_physics/layer_1="Static Environment"
|
|
||||||
3d_physics/layer_2="Entities"
|
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
textures/canvas_textures/default_texture_filter=0
|
textures/canvas_textures/default_texture_filter=0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue