Split client and server

This commit is contained in:
2024-01-24 00:09:50 +01:00
parent 532a1faa21
commit 26c52a00b3
59 changed files with 335 additions and 142 deletions

2
client/enemy/Enemy.gd Normal file
View File

@ -0,0 +1,2 @@
class_name Enemy
extends Character

View File

@ -0,0 +1,2 @@
class_name EnemyController
extends Node

View File

@ -0,0 +1,50 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b358op5h1y83m"
path="res://.godot/imported/Slime.blend-8da460d18e3c1f7085d49df94a74fec6.scn"
[deps]
source_file="res://enemy/Slime.blend"
dest_files=["res://.godot/imported/Slime.blend-8da460d18e3c1f7085d49df94a74fec6.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
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
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
blender/nodes/visible=0
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/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

55
client/enemy/Slime.tscn Normal file
View File

@ -0,0 +1,55 @@
[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"
length = 2.0
loop_mode = 1
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, 1, 1, 1, 0.5, 1, 0.9, 1.1, 0.9, 1, 1, 1, 1, 1, 1.5, 1, 1.1, 0.9, 1.1, 2, 1, 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="CharacterBody3D" node_paths=PackedStringArray("model") groups=["enemy"]]
script = ExtResource("1_r5888")
model = NodePath("Model")
[node name="Model" parent="." instance=ExtResource("1_1h1hj")]
[node name="Collision" 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="Animation" type="AnimationPlayer" parent="."]
root_node = NodePath("../Model")
libraries = {
"": SubResource("AnimationLibrary_1bw8m")
}
autoplay = "slime_idle"
[node name="Health" parent="." instance=ExtResource("2_fsqxc")]