Added debug labels
This commit is contained in:
parent
7eba25c83b
commit
ce699ee6db
3
character/Attack.gd
Normal file
3
character/Attack.gd
Normal file
@ -0,0 +1,3 @@
|
||||
class_name Attack
|
||||
|
||||
var damage: float
|
44
character/Character.gd
Normal file
44
character/Character.gd
Normal file
@ -0,0 +1,44 @@
|
||||
class_name Character
|
||||
extends CharacterBody3D
|
||||
|
||||
@export var model: Node3D
|
||||
@export var move_speed: float = 4.5
|
||||
@export var rotation_speed: float = 20.0
|
||||
|
||||
const JUMP_VELOCITY := 4.5
|
||||
const DECELERATE := 0.75
|
||||
|
||||
var direction: Vector3
|
||||
var angle: float
|
||||
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
|
||||
func _process(delta):
|
||||
if direction:
|
||||
angle = atan2(direction.x, direction.z)
|
||||
|
||||
model.rotation.y = lerp_angle(model.rotation.y, angle, rotation_speed * delta)
|
||||
|
||||
func _physics_process(delta):
|
||||
if direction:
|
||||
velocity.x = direction.x * move_speed
|
||||
velocity.z = direction.z * move_speed
|
||||
else:
|
||||
velocity.x *= DECELERATE
|
||||
velocity.z *= DECELERATE
|
||||
|
||||
if !is_on_floor():
|
||||
velocity.y -= gravity * delta
|
||||
|
||||
move_and_slide()
|
||||
|
||||
func jump():
|
||||
if !is_on_floor():
|
||||
return
|
||||
|
||||
velocity.y = JUMP_VELOCITY
|
||||
|
||||
func dash():
|
||||
print("dash")
|
||||
|
||||
func attack():
|
||||
print("attack")
|
2
character/CharacterController.gd
Normal file
2
character/CharacterController.gd
Normal file
@ -0,0 +1,2 @@
|
||||
class_name CharacterController
|
||||
extends Node
|
14
character/HealthComponent.gd
Normal file
14
character/HealthComponent.gd
Normal file
@ -0,0 +1,14 @@
|
||||
class_name HealthComponent
|
||||
extends Node
|
||||
|
||||
@export var max_health: float
|
||||
var health: float
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func take_damage(attack: Attack):
|
||||
health -= attack.damage
|
||||
|
||||
if health <= 0:
|
||||
get_parent().queue_free()
|
6
character/HealthComponent.tscn
Normal file
6
character/HealthComponent.tscn
Normal file
@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://2bbycjulf00g"]
|
||||
|
||||
[ext_resource type="Script" path="res://character/HealthComponent.gd" id="1_403dm"]
|
||||
|
||||
[node name="HealthComponent" type="Node"]
|
||||
script = ExtResource("1_403dm")
|
2
enemy/Enemy.gd
Normal file
2
enemy/Enemy.gd
Normal file
@ -0,0 +1,2 @@
|
||||
class_name Enemy
|
||||
extends Character
|
18
enemy/EnemyController.gd
Normal file
18
enemy/EnemyController.gd
Normal file
@ -0,0 +1,18 @@
|
||||
class_name EnemyController
|
||||
extends CharacterController
|
||||
|
||||
@export var character: Character
|
||||
var move: Vector2
|
||||
|
||||
func _input(_event):
|
||||
move = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
character.direction = (Global.camera.transform.basis * Vector3(move.x, 0, move.y)).normalized()
|
||||
|
||||
if Input.is_action_pressed("jump"):
|
||||
character.jump()
|
||||
|
||||
if Input.is_action_pressed("attack"):
|
||||
print("Attack")
|
||||
|
||||
if Input.is_action_pressed("aim"):
|
||||
print("Aim")
|
@ -1,6 +1,21 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cb2t7bvvf3gwh"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cb2t7bvvf3gwh"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b358op5h1y83m" path="res://enemy/Slime.blend" id="1_1h1hj"]
|
||||
[ext_resource type="Script" path="res://enemy/Enemy.gd" id="1_r5888"]
|
||||
[ext_resource type="PackedScene" uid="uid://2bbycjulf00g" path="res://character/HealthComponent.tscn" id="2_fsqxc"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_x1ppt"]
|
||||
size = Vector3(0.7, 0.6, 0.7)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qls31"]
|
||||
resource_name = "slime_fall"
|
||||
tracks/0/type = "scale_3d"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Slime")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = PackedFloat32Array(0, 1, 0.5, 1.2, 0.5, 0.5, 1, 0.6, 1, 0.6, 1, 1, 0.5, 1.2, 0.5)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_mdtm7"]
|
||||
resource_name = "slime_idle"
|
||||
@ -16,16 +31,25 @@ tracks/0/keys = PackedFloat32Array(0, 1, 1, 1, 1, 0.5, 1, 0.9, 1.1, 0.9, 1, 1, 1
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1bw8m"]
|
||||
_data = {
|
||||
"slime_fall": SubResource("Animation_qls31"),
|
||||
"slime_idle": SubResource("Animation_mdtm7")
|
||||
}
|
||||
|
||||
[node name="Slime" type="Node3D"]
|
||||
[node name="Slime" type="CharacterBody3D" node_paths=PackedStringArray("model") groups=["enemy"]]
|
||||
script = ExtResource("1_r5888")
|
||||
model = NodePath("Model")
|
||||
|
||||
[node name="Model" parent="." instance=ExtResource("1_1h1hj")]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0452515, 0.3, 0)
|
||||
shape = SubResource("BoxShape3D_x1ppt")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
root_node = NodePath("../Model")
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_1bw8m")
|
||||
}
|
||||
autoplay = "slime_idle"
|
||||
|
||||
[node name="HealthComponent" parent="." instance=ExtResource("2_fsqxc")]
|
||||
|
@ -1,34 +1,2 @@
|
||||
class_name Player
|
||||
extends CharacterBody3D
|
||||
|
||||
const MOVE_SPEED = 4.5
|
||||
const JUMP_VELOCITY = 4.5
|
||||
const DECELERATE = 0.75
|
||||
|
||||
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
var move: Vector2
|
||||
|
||||
func _input(_event):
|
||||
move = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
|
||||
func _physics_process(delta):
|
||||
movement()
|
||||
fall(delta)
|
||||
move_and_slide()
|
||||
|
||||
func movement():
|
||||
var direction = (Global.camera.transform.basis * Vector3(move.x, 0, move.y)).normalized()
|
||||
|
||||
if direction:
|
||||
velocity.x = direction.x * MOVE_SPEED
|
||||
velocity.z = direction.z * MOVE_SPEED
|
||||
else:
|
||||
velocity.x *= DECELERATE
|
||||
velocity.z *= DECELERATE
|
||||
|
||||
func fall(delta):
|
||||
if is_on_floor():
|
||||
if Input.is_action_just_pressed("jump"):
|
||||
velocity.y = JUMP_VELOCITY
|
||||
else:
|
||||
velocity.y -= gravity * delta
|
||||
extends Character
|
||||
|
@ -1,23 +1,34 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://2lcnu3dy54lx"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://2lcnu3dy54lx"]
|
||||
|
||||
[ext_resource type="Script" path="res://player/Player.gd" id="1_8gebs"]
|
||||
[ext_resource type="PackedScene" uid="uid://2bbycjulf00g" path="res://character/HealthComponent.tscn" id="2_np5ag"]
|
||||
[ext_resource type="Script" path="res://player/PlayerController.gd" id="3_oox5k"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_fx2di"]
|
||||
[sub_resource type="PrismMesh" id="PrismMesh_y7abh"]
|
||||
size = Vector3(0.5, 1.6, 0.5)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5eict"]
|
||||
diffuse_mode = 3
|
||||
albedo_color = Color(0.0588235, 0.0823529, 0.113725, 1)
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2f50n"]
|
||||
radius = 0.23
|
||||
height = 1.6
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_8125v"]
|
||||
material = SubResource("StandardMaterial3D_5eict")
|
||||
|
||||
[node name="Player" type="CharacterBody3D" groups=["Player"]]
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("model") groups=["player"]]
|
||||
script = ExtResource("1_8gebs")
|
||||
model = NodePath("Model")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
shape = SubResource("BoxShape3D_fx2di")
|
||||
[node name="Model" type="Node3D" parent="."]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
mesh = SubResource("BoxMesh_8125v")
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0)
|
||||
mesh = SubResource("PrismMesh_y7abh")
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0)
|
||||
shape = SubResource("CapsuleShape3D_2f50n")
|
||||
|
||||
[node name="HealthComponent" parent="." instance=ExtResource("2_np5ag")]
|
||||
|
||||
[node name="PlayerController" type="Node" parent="." node_paths=PackedStringArray("character")]
|
||||
script = ExtResource("3_oox5k")
|
||||
character = NodePath("..")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
|
20
player/PlayerController.gd
Normal file
20
player/PlayerController.gd
Normal file
@ -0,0 +1,20 @@
|
||||
class_name PlayerController
|
||||
extends CharacterController
|
||||
|
||||
@export var character: Character
|
||||
var move: Vector2
|
||||
|
||||
func _input(_event):
|
||||
move = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
character.direction = (Global.camera.transform.basis * Vector3(move.x, 0, move.y))
|
||||
character.direction.y = 0
|
||||
character.direction = character.direction.normalized()
|
||||
|
||||
if Input.is_action_just_pressed("jump"):
|
||||
character.jump()
|
||||
|
||||
if Input.is_action_just_pressed("dash"):
|
||||
character.dash()
|
||||
|
||||
if Input.is_action_just_pressed("attack"):
|
||||
character.attack()
|
@ -63,13 +63,18 @@ jump={
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
dash={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"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,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
toggle_fullscreen={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":true,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, 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":4194342,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
shoot={
|
||||
attack={
|
||||
"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)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
||||
@ -81,14 +86,13 @@ aim={
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
crouch={
|
||||
"deadzone": 0.5,
|
||||
"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":4194326,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
menu={
|
||||
"deadzone": 0.5,
|
||||
"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)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
3d/run_on_separate_thread=true
|
||||
|
@ -1,5 +0,0 @@
|
||||
extends Label
|
||||
|
||||
func _process(_delta):
|
||||
var fps = Engine.get_frames_per_second()
|
||||
text = str(fps)
|
8
ui/debug/DebugLabel.gd
Normal file
8
ui/debug/DebugLabel.gd
Normal file
@ -0,0 +1,8 @@
|
||||
class_name DebugLabel
|
||||
extends Control
|
||||
|
||||
var text : String :
|
||||
get:
|
||||
return get_child(1).text
|
||||
set(value):
|
||||
get_child(1).text = value
|
15
ui/debug/DebugLabel.tscn
Normal file
15
ui/debug/DebugLabel.tscn
Normal file
@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cch67vqpsmtej"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/debug/DebugLabel.gd" id="1_xfly0"]
|
||||
[ext_resource type="Script" path="res://ui/debug/DebugLabelText.gd" id="2_i4ix0"]
|
||||
|
||||
[node name="Container" type="HBoxContainer"]
|
||||
script = ExtResource("1_xfly0")
|
||||
|
||||
[node name="Text" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
text = ":"
|
||||
script = ExtResource("2_i4ix0")
|
||||
|
||||
[node name="Value" type="Label" parent="."]
|
||||
layout_mode = 2
|
5
ui/debug/DebugLabelText.gd
Normal file
5
ui/debug/DebugLabelText.gd
Normal file
@ -0,0 +1,5 @@
|
||||
@tool
|
||||
extends Label
|
||||
|
||||
func _ready():
|
||||
text = get_parent().name + ":"
|
4
ui/debug/FPSLabel.gd
Normal file
4
ui/debug/FPSLabel.gd
Normal file
@ -0,0 +1,4 @@
|
||||
extends DebugLabel
|
||||
|
||||
func _process(_delta):
|
||||
text = str(Engine.get_frames_per_second())
|
6
ui/debug/PerformanceLabel.gd
Normal file
6
ui/debug/PerformanceLabel.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends DebugLabel
|
||||
|
||||
@export var monitor: Performance.Monitor
|
||||
|
||||
func _process(_delta):
|
||||
text = str(Performance.get_monitor(monitor))
|
@ -1,7 +1,7 @@
|
||||
extends Label
|
||||
extends DebugLabel
|
||||
|
||||
func _ready():
|
||||
%Ping.connect("changed", on_ping_changed)
|
||||
|
||||
func on_ping_changed(ping):
|
||||
text = str(snapped(ping * 1000, 0.01))
|
||||
text = str(snapped(ping * 1000, 0.1)) + " ms"
|
@ -1,4 +1,4 @@
|
||||
extends Label
|
||||
extends DebugLabel
|
||||
|
||||
func _process(_delta):
|
||||
if Global.player == null:
|
7
ui/debug/VelocityLabel.gd
Normal file
7
ui/debug/VelocityLabel.gd
Normal file
@ -0,0 +1,7 @@
|
||||
extends DebugLabel
|
||||
|
||||
func _process(_delta):
|
||||
if Global.player == null:
|
||||
return
|
||||
|
||||
text = str(Global.player.velocity)
|
@ -1,16 +1,18 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://b40y7iuskv1ar"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://b40y7iuskv1ar"]
|
||||
|
||||
[ext_resource type="Script" path="res://world/Game.gd" id="1_xmqq4"]
|
||||
[ext_resource type="Script" path="res://ui/FPSLabel.gd" id="3_k5d80"]
|
||||
[ext_resource type="Script" path="res://ui/PingLabel.gd" id="4_1a3hc"]
|
||||
[ext_resource type="Script" path="res://network/Network.gd" id="4_ao4cj"]
|
||||
[ext_resource type="Script" path="res://network/Ping.gd" id="4_vx388"]
|
||||
[ext_resource type="PackedScene" uid="uid://2lcnu3dy54lx" path="res://player/Player.tscn" id="5_6c2x8"]
|
||||
[ext_resource type="Environment" uid="uid://dixa0yso2s1u3" path="res://world/Environment.tres" id="5_bll74"]
|
||||
[ext_resource type="Script" path="res://world/Sun.gd" id="5_pf5uw"]
|
||||
[ext_resource type="CameraAttributesPractical" uid="uid://b835orxyqq6w5" path="res://world/CameraAttributes.tres" id="6_8wfwf"]
|
||||
[ext_resource type="PackedScene" uid="uid://cch67vqpsmtej" path="res://ui/debug/DebugLabel.tscn" id="6_076g5"]
|
||||
[ext_resource type="Script" path="res://network/Login.gd" id="6_augbg"]
|
||||
[ext_resource type="Script" path="res://ui/PositionLabel.gd" id="8_jc5xy"]
|
||||
[ext_resource type="Script" path="res://ui/debug/FPSLabel.gd" id="7_3qgww"]
|
||||
[ext_resource type="Script" path="res://ui/debug/PingLabel.gd" id="7_kmy1y"]
|
||||
[ext_resource type="Script" path="res://ui/debug/PositionLabel.gd" id="8_fge13"]
|
||||
[ext_resource type="Script" path="res://ui/debug/VelocityLabel.gd" id="9_f25hg"]
|
||||
[ext_resource type="Script" path="res://world/Camera.gd" id="9_qfhy4"]
|
||||
[ext_resource type="Material" uid="uid://ddy5gkw0k16dq" path="res://world/shader/OutlineMaterial.tres" id="10_dii8l"]
|
||||
[ext_resource type="PackedScene" uid="uid://hnn0n1xc2qt7" path="res://world/Tree.blend" id="15_csh38"]
|
||||
@ -60,48 +62,39 @@ anchors_preset = 0
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="UI"]
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/CanvasLayer"]
|
||||
[node name="TopLeftMargin" type="MarginContainer" parent="UI/CanvasLayer"]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 50.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/CanvasLayer/MarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/CanvasLayer/TopLeftMargin"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="UI/CanvasLayer/MarginContainer/VBoxContainer"]
|
||||
[node name="FPS" parent="UI/CanvasLayer/TopLeftMargin/VBoxContainer" instance=ExtResource("6_076g5")]
|
||||
layout_mode = 2
|
||||
script = ExtResource("7_3qgww")
|
||||
|
||||
[node name="Ping" parent="UI/CanvasLayer/TopLeftMargin/VBoxContainer" instance=ExtResource("6_076g5")]
|
||||
layout_mode = 2
|
||||
script = ExtResource("7_kmy1y")
|
||||
|
||||
[node name="BottomLeftMargin" type="MarginContainer" parent="UI/CanvasLayer"]
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -10.0
|
||||
offset_right = 10.0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/CanvasLayer/BottomLeftMargin"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FPSLabel" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
[node name="Position" parent="UI/CanvasLayer/BottomLeftMargin/VBoxContainer" instance=ExtResource("6_076g5")]
|
||||
layout_mode = 2
|
||||
text = "FPS:"
|
||||
script = ExtResource("8_fge13")
|
||||
|
||||
[node name="FPS" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
[node name="Velocity" parent="UI/CanvasLayer/BottomLeftMargin/VBoxContainer" instance=ExtResource("6_076g5")]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
script = ExtResource("3_k5d80")
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="UI/CanvasLayer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PingLabel" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Ping:"
|
||||
|
||||
[node name="Ping" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
script = ExtResource("4_1a3hc")
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="UI/CanvasLayer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PositionLabel" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "Position:"
|
||||
|
||||
[node name="Position" type="Label" parent="UI/CanvasLayer/MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
script = ExtResource("8_jc5xy")
|
||||
script = ExtResource("9_f25hg")
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||
texture_filter = 1
|
||||
@ -111,17 +104,16 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
stretch = true
|
||||
stretch_shrink = 3
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
handle_input_locally = false
|
||||
size = Vector2i(384, 216)
|
||||
size = Vector2i(1152, 648)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="CameraPivot" type="Node3D" parent="SubViewportContainer/SubViewport"]
|
||||
|
||||
[node name="Camera" type="Camera3D" parent="SubViewportContainer/SubViewport/CameraPivot" node_paths=PackedStringArray("center")]
|
||||
transform = Transform3D(0.707107, 0.408607, -0.577096, 0, 0.816138, 0.577858, 0.707107, -0.408607, 0.577096, -10, 10, 10)
|
||||
transform = Transform3D(0.707107, 0.353554, -0.612372, 0, 0.866026, 0.5, 0.707107, -0.353554, 0.612372, -10, 10, 10)
|
||||
projection = 1
|
||||
current = true
|
||||
fov = 90.0
|
||||
@ -153,9 +145,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.25, 0)
|
||||
mesh = SubResource("BoxMesh_0bujj")
|
||||
skeleton = NodePath("../../../..")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="SubViewportContainer/SubViewport/World/Ground"]
|
||||
[node name="Ground" type="StaticBody3D" parent="SubViewportContainer/SubViewport/World/Ground"]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/World/Ground/StaticBody3D"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/World/Ground/Ground"]
|
||||
shape = SubResource("BoxShape3D_58ws3")
|
||||
|
||||
[node name="Tree" parent="SubViewportContainer/SubViewport/World" instance=ExtResource("15_csh38")]
|
||||
@ -170,13 +162,13 @@ unique_name_in_owner = true
|
||||
[node name="Enemies" type="Node3D" parent="SubViewportContainer/SubViewport"]
|
||||
|
||||
[node name="Slime" parent="SubViewportContainer/SubViewport/Enemies" instance=ExtResource("16_fuixr")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.53558, 0, -3.79687)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.53558, 1.28057, -3.79687)
|
||||
|
||||
[node name="Slime2" parent="SubViewportContainer/SubViewport/Enemies" instance=ExtResource("16_fuixr")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.00829, 0, -1.95247)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.00829, 1.28057, -1.95247)
|
||||
|
||||
[node name="Slime3" parent="SubViewportContainer/SubViewport/Enemies" instance=ExtResource("16_fuixr")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.53558, 0, -0.306177)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.53558, 1.28057, -0.306177)
|
||||
|
||||
[connection signal="timeout" from="Network/Ping/Timer" to="Network/Ping" method="send_ping"]
|
||||
[connection signal="timeout" from="Network/Login/Timer" to="Network/Login" method="send_login"]
|
||||
|
Loading…
Reference in New Issue
Block a user