fixed file structure

This commit is contained in:
leca 2024-02-25 18:26:42 +03:00
parent 18471e74ec
commit 534a3be505
23 changed files with 1043 additions and 53 deletions

View File

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="Cs-os"
run/main_scene="res://scenes/menu.tscn"
run/main_scene="res://scenes/HUD/menu.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
boot_splash/bg_color=Color(0.282353, 0.00784314, 0.0745098, 1)
config/icon="res://icon.svg"

View File

@ -0,0 +1,70 @@
[gd_scene load_steps=2 format=3 uid="uid://b8ulqlywdvqba"]
[ext_resource type="Script" path="res://scripts/Select.gd" id="1_nua8c"]
[node name="ChooseTeam" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CS" type="Control" parent="."]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_top = -20.0
offset_right = 40.0
offset_bottom = 20.0
grow_vertical = 2
[node name="Closed source" type="Label" parent="CS"]
layout_mode = 0
offset_left = 100.0
offset_top = -100.0
offset_right = 208.0
offset_bottom = -77.0
text = "Closed source
"
[node name="Select_CS" type="Button" parent="CS"]
layout_mode = 0
offset_left = 121.0
offset_right = 175.0
offset_bottom = 31.0
text = "Select
"
script = ExtResource("1_nua8c")
[node name="OS" type="Control" parent="."]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -40.0
offset_top = -20.0
offset_bottom = 20.0
grow_horizontal = 0
grow_vertical = 2
[node name="Open source" type="Label" parent="OS"]
layout_mode = 0
offset_left = -150.0
offset_top = -100.0
offset_right = -52.0
offset_bottom = -77.0
text = "Open source
"
[node name="Select_OS" type="Button" parent="OS"]
layout_mode = 0
offset_left = -129.0
offset_right = -75.0
offset_bottom = 31.0
text = "Select
"
script = ExtResource("1_nua8c")

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://cjlgs86ey1u1o"]
[ext_resource type="Script" path="res://scripts/ConnectButton.gd" id="1_oqnod"]
[ext_resource type="Script" path="res://scenes/Nickname.gd" id="2_c3c3b"]
[ext_resource type="Script" path="res://scripts/ConnectButton.gd" id="1_nhpm2"]
[ext_resource type="Script" path="res://scripts/Nickname.gd" id="2_5xejq"]
[node name="Menu" type="Control"]
layout_mode = 3
@ -41,7 +41,7 @@ offset_right = 172.0
offset_bottom = 138.0
pivot_offset = Vector2(88, 24)
text = "Connect"
script = ExtResource("1_oqnod")
script = ExtResource("1_nhpm2")
[node name="PlayerMenu" type="Control" parent="."]
anchors_preset = 0
@ -71,4 +71,4 @@ offset_top = 104.0
offset_right = 152.0
offset_bottom = 120.0
text = "Set"
script = ExtResource("2_c3c3b")
script = ExtResource("2_5xejq")

13
scenes/models/ak_47.tscn Normal file
View File

@ -0,0 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://caos4gg5cd6f6"]
[ext_resource type="PackedScene" uid="uid://dndsa6rm6hovq" path="res://scenes/models/automatto.dae" id="1_kapkd"]
[node name="ak-47" type="Node3D"]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.570068, 0, 0)
[node name="automatto" parent="." instance=ExtResource("1_kapkd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.18626, -1.25157, 0)
[node name="raycast" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.92407, 0.951779, 0)
target_position = Vector3(-1, 0, 0)

485
scenes/models/automatto.dae Normal file
View File

@ -0,0 +1,485 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Anonymous</author>
<authoring_tool>Collada Exporter for Blender 2.6+, by Juan Linietsky (juan@codenix.com)</authoring_tool>
</contributor>
<created>2024-02-17T21:56:07Z</created>
<modified>2024-02-17T21:56:07Z</modified>
<unit meter="1.0" name="meter"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="id-fx-2" name="Material-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-6" name="Material.001-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-10" name="Material.002-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="id-material-3" name="Material">
<instance_effect url="#id-fx-2"/>
</material>
<material id="id-material-7" name="Material.001">
<instance_effect url="#id-fx-6"/>
</material>
<material id="id-material-11" name="Material.002">
<instance_effect url="#id-fx-10"/>
</material>
</library_materials>
<library_geometries>
<geometry id="id-mesh-4" name="Cube">
<mesh>
<source id="id-mesh-4-positions">
<float_array id="id-mesh-4-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-normals">
<float_array id="id-mesh-4-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-texcoord-0">
<float_array id="id-mesh-4-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-4-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-4-vertices">
<input semantic="POSITION" source="#id-mesh-4-positions"/>
</vertices>
<polygons count="6" material="id-trimat-5">
<input semantic="VERTEX" source="#id-mesh-4-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-4-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-4-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-8" name="Cube.001">
<mesh>
<source id="id-mesh-8-positions">
<float_array id="id-mesh-8-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-normals">
<float_array id="id-mesh-8-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-texcoord-0">
<float_array id="id-mesh-8-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-8-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-8-vertices">
<input semantic="POSITION" source="#id-mesh-8-positions"/>
</vertices>
<polygons count="6" material="id-trimat-9">
<input semantic="VERTEX" source="#id-mesh-8-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-8-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-8-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-12" name="Cube.002">
<mesh>
<source id="id-mesh-12-positions">
<float_array id="id-mesh-12-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-12-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-12-normals">
<float_array id="id-mesh-12-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-12-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-12-texcoord-0">
<float_array id="id-mesh-12-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-12-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-12-vertices">
<input semantic="POSITION" source="#id-mesh-12-positions"/>
</vertices>
<polygons count="6" material="id-trimat-13">
<input semantic="VERTEX" source="#id-mesh-12-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-12-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-12-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-14" name="Cube.003">
<mesh>
<source id="id-mesh-14-positions">
<float_array id="id-mesh-14-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-14-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-14-normals">
<float_array id="id-mesh-14-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-14-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-14-texcoord-0">
<float_array id="id-mesh-14-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-14-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-14-vertices">
<input semantic="POSITION" source="#id-mesh-14-positions"/>
</vertices>
<polygons count="6" material="id-trimat-15">
<input semantic="VERTEX" source="#id-mesh-14-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-14-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-14-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-16" name="Cube.004">
<mesh>
<source id="id-mesh-16-positions">
<float_array id="id-mesh-16-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-16-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-16-normals">
<float_array id="id-mesh-16-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-16-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-16-texcoord-0">
<float_array id="id-mesh-16-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-16-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-16-vertices">
<input semantic="POSITION" source="#id-mesh-16-positions"/>
</vertices>
<polygons count="6" material="id-trimat-17">
<input semantic="VERTEX" source="#id-mesh-16-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-16-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-16-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-18" name="Cube.005">
<mesh>
<source id="id-mesh-18-positions">
<float_array id="id-mesh-18-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-18-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-18-normals">
<float_array id="id-mesh-18-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-18-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-18-texcoord-0">
<float_array id="id-mesh-18-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-18-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-18-vertices">
<input semantic="POSITION" source="#id-mesh-18-positions"/>
</vertices>
<polygons count="6" material="id-trimat-19">
<input semantic="VERTEX" source="#id-mesh-18-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-18-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-18-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="id-scene-1" name="scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform"> 2.6000001430511475 0.0 0.0 0.0 0.0 0.19977541267871857 0.0 0.0 0.0 0.0 0.4598263204097748 2.203359842300415 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-4">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-5" target="#id-material-3"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.001" name="Cube.001" type="NODE">
<matrix sid="transform"> -1.57242467935248e-08 0.0009324373677372932 0.2314780056476593 1.6276607513427734 1.6476175090929246e-08 0.11205510795116425 -0.0019261838169768453 -0.012317478656768799 -0.5210391283035278 3.515240321050328e-09 -7.046598859972164e-09 1.4152696132659912 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-8">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-9" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.002" name="Cube.002" type="NODE">
<matrix sid="transform"> 0.012317821383476257 0.0 -0.23190557956695557 -1.2648444175720215 0.0 0.11228424310684204 0.0 -0.016380950808525085 0.9720970988273621 0.0 0.002938566030934453 1.156082034111023 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-12">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-13" target="#id-material-11"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.003" name="Cube.003" type="NODE">
<matrix sid="transform"> 0.4965575635433197 0.0 0.0 2.8978543281555176 0.0 0.16011132299900055 0.0 -0.0013670185580849648 0.0 0.0 0.24370159208774567 2.1922411918640137 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-14">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-15" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.004" name="Cube.004" type="NODE">
<matrix sid="transform"> 0.4965575635433197 0.0 0.0 3.762096643447876 0.0 0.19658255577087402 0.0 -0.0028609037399291992 0.0 0.0 0.28466933965682983 2.1854066848754883 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-16">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-17" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.005" name="Cube.005" type="NODE">
<matrix sid="transform"> 0.3889171779155731 0.0 0.0 -2.7596819400787354 0.0 0.06061943992972374 0.0 0.0 0.0 0.0 0.06876473128795624 2.203359842300415 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-18">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-19" target="#id-material-11"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#id-scene-1" />
</scene>
</COLLADA>

View File

@ -0,0 +1,34 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dndsa6rm6hovq"
path="res://.godot/imported/automatto.dae-f7024c685fe1af02633a09bb6d2a998a.scn"
[deps]
source_file="res://scenes/models/automatto.dae"
dest_files=["res://.godot/imported/automatto.dae-f7024c685fe1af02633a09bb6d2a998a.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

BIN
scenes/models/buddy.glb Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://coa22cxx7aoe1"
path="res://.godot/imported/buddy.glb-8ddedc557e087d8081a0b6ce807345a2.scn"
[deps]
source_file="res://scenes/models/buddy.glb"
dest_files=["res://.godot/imported/buddy.glb-8ddedc557e087d8081a0b6ce807345a2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 KiB

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dirdtjfuc7ibi"
path.s3tc="res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-ae0efba9d59eb45d45ee0c23fbb9243e.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://scenes/models/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg"
dest_files=["res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-ae0efba9d59eb45d45ee0c23fbb9243e.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

12
scenes/models/pistol.tscn Normal file
View File

@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://cnu1vf8k5i3tv"]
[ext_resource type="PackedScene" uid="uid://hf47u08p80fo" path="res://scenes/models/pistoletto.dae" id="1_hdcb6"]
[node name="pistol" type="Node3D"]
[node name="pistoletto" parent="." instance=ExtResource("1_hdcb6")]
transform = Transform3D(0.21, 0, 0, 0, 0.21, 0, 0, 0, 0.21, 0, 0, 0)
[node name="raycast" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.461124, 0.0946267, 2.01564e-08)
target_position = Vector3(-1, 0, 0)

View File

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Anonymous</author>
<authoring_tool>Collada Exporter for Blender 2.6+, by Juan Linietsky (juan@codenix.com)</authoring_tool>
</contributor>
<created>2024-02-17T21:50:36Z</created>
<modified>2024-02-17T21:50:36Z</modified>
<unit meter="1.0" name="meter"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="id-fx-2" name="Material.002-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-6" name="Material.001-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="id-material-3" name="Material.002">
<instance_effect url="#id-fx-2"/>
</material>
<material id="id-material-7" name="Material.001">
<instance_effect url="#id-fx-6"/>
</material>
</library_materials>
<library_geometries>
<geometry id="id-mesh-4" name="Cube">
<mesh>
<source id="id-mesh-4-positions">
<float_array id="id-mesh-4-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-normals">
<float_array id="id-mesh-4-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-texcoord-0">
<float_array id="id-mesh-4-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-4-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-4-vertices">
<input semantic="POSITION" source="#id-mesh-4-positions"/>
</vertices>
<polygons count="6" material="id-trimat-5">
<input semantic="VERTEX" source="#id-mesh-4-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-4-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-4-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-8" name="Cube.001">
<mesh>
<source id="id-mesh-8-positions">
<float_array id="id-mesh-8-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-normals">
<float_array id="id-mesh-8-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-texcoord-0">
<float_array id="id-mesh-8-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-8-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-8-vertices">
<input semantic="POSITION" source="#id-mesh-8-positions"/>
</vertices>
<polygons count="6" material="id-trimat-9">
<input semantic="VERTEX" source="#id-mesh-8-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-8-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-8-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="id-scene-1" name="scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform"> 0.28390204906463623 0.0 0.30559131503105164 -0.016092630103230476 0.0 0.11151131987571716 0.0 0.0 -0.7800144553184509 0.0 0.1112261414527893 -0.06142665445804596 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-4">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-5" target="#id-material-3"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.001" name="Cube.001" type="NODE">
<matrix sid="transform"> 1.2125928401947021 0.0 0.0 -1.1341843605041504 0.0 0.12897871434688568 0.0 0.0 0.0 0.0 0.33654701709747314 0.5419423580169678 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-8">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-9" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#id-scene-1" />
</scene>
</COLLADA>

View File

@ -0,0 +1,34 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://hf47u08p80fo"
path="res://.godot/imported/pistoletto.dae-04bdabc945b0c35e4dde01b17b4398c8.scn"
[deps]
source_file="res://scenes/models/pistoletto.dae"
dest_files=["res://.godot/imported/pistoletto.dae-04bdabc945b0c35e4dde01b17b4398c8.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

53
scenes/models/player.tscn Normal file
View File

@ -0,0 +1,53 @@
[gd_scene load_steps=7 format=3 uid="uid://b2jhgtduapovl"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_8hh2g"]
[ext_resource type="PackedScene" uid="uid://cnu1vf8k5i3tv" path="res://scenes/models/pistol.tscn" id="2_86kn4"]
[ext_resource type="PackedScene" uid="uid://caos4gg5cd6f6" path="res://scenes/models/ak_47.tscn" id="3_sko6x"]
[sub_resource type="SphereMesh" id="SphereMesh_fp0bl"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yyp7b"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_jqfxo"]
[node name="player" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.10113, 0)
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
script = ExtResource("1_8hh2g")
[node name="Head" type="Node3D" parent="CharacterBody3D"]
[node name="Camera" type="Camera3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.675496, 0)
[node name="viewRaycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera"]
target_position = Vector3(0, 0, -100)
[node name="Hand" type="Node3D" parent="CharacterBody3D/Head/Camera"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.72454, -0.463491, -0.808041)
[node name="knife" type="MeshInstance3D" parent="CharacterBody3D/Head/Camera/Hand"]
transform = Transform3D(0.16, 0, 0, 0, 0.16, 0, 0, 0, 0.16, 0, 0, 0)
visible = false
mesh = SubResource("SphereMesh_fp0bl")
[node name="raycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera/Hand/knife"]
[node name="pistol" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("2_86kn4")]
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 0, 0)
visible = false
[node name="ak-47" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("3_sko6x")]
visible = false
[node name="Nickname" type="Label3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.24983, 0)
billboard = 1
text = "Unnamed"
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D"]
shape = SubResource("CapsuleShape3D_yyp7b")
[node name="MeshInstance3D" type="MeshInstance3D" parent="CharacterBody3D"]
mesh = SubResource("CapsuleMesh_jqfxo")

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://bf6uev4mtg2ls"]
[ext_resource type="Script" path="res://scripts/SpectatorControls.gd" id="1_uqbjn"]
[node name="head" type="Node3D"]
script = ExtResource("1_uqbjn")
[node name="Camera" type="Camera3D" parent="."]

View File

@ -1,11 +0,0 @@
extends Node3D
# 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

View File

@ -1,5 +0,0 @@
[gd_scene format=3 uid="uid://d0tdlmmo1texv"]
[node name="test_map" type="Node3D"]
[node name="terrain" type="Node3D" parent="."]

View File

@ -3,7 +3,7 @@ var player_script := preload("res://scripts/Player.gd")
var server_map
@onready var Weapons = GameData.Weapons
var player_model = preload("res://models/player.tscn")
var player_model = preload("res://scenes/models/player.tscn")
var peer = ENetMultiplayerPeer.new()
var settings
var clients = {}
@ -29,10 +29,10 @@ func _ready():
var path
if (arguments.has("map")):
map_root_name = str(arguments["map"])
path = "res://scenes/Map/" + str(arguments["map"]) + ".tscn"
path = "res://scenes/maps/" + str(arguments["map"]) + ".tscn"
else:
map_root_name = "OffisMi"
path = "res://scenes/Map/OffisMi.tscn"
path = "res://scenes/maps/OffisMi.tscn"
StartServer(path)
map_path = path
#######################################SERVER####################################
@ -66,7 +66,7 @@ func StartServer(map_name):
peer.connect("peer_connected", _Peer_Connected)
peer.connect("peer_disconnected", _Peer_Disconnected)
var spectator = preload("res://models/spectator.tscn").instantiate()
var spectator = preload("res://scenes/models/spectator.tscn").instantiate()
server_map.add_child(spectator)
func send_everyone_except(client_id, args):
@ -127,7 +127,7 @@ func client_ready(client_id):
var internal_id = client["internal_id"]
send_everyone_except(client_id, ["spawn_puppet", clients[client_id]])
clients[client_id]["ready"] = true
var client_cb3d = find_cb3d_by_internal_id(internal_id)
var class_spawnpoint = find_class_type_by_number(client["class_type"])["spawnpoint"]
@ -187,12 +187,7 @@ func shot(client_id):
var internal_id = client["internal_id"]
var current_weapon = settings["game"]["weapons"].find_key(find_weapon_by_number(client["current_weapon"]["number"]))
var current_weapon_settings = settings["game"]["weapons"][current_weapon]
#var view_raycast:RayCast3D = find_cb3d_by_internal_id(internal_id).get_node("Head/Camera/viewRaycast")
#var raycast:RayCast3D = find_cb3d_by_internal_id(internal_id).get_node("Head/Camera/viewRaycast")
#var weapon_raycast:RayCast3D = find_cb3d_by_internal_id(internal_id).get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
print(current_weapon)
var client_cb3d = find_cb3d_by_internal_id(internal_id)
var raycast:RayCast3D = client_cb3d.get_node("Head/Camera/viewRaycast")
var weapon_raycast:RayCast3D = client_cb3d.get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
@ -203,10 +198,10 @@ func shot(client_id):
weapon_raycast.target_position = weapon_raycast.to_local(target_point) #- weapon_raycast.position)
weapon_raycast.get_node("..").rotation.y = - atan((weapon_raycast.position.x - client_cb3d.position.x) / ((-current_weapon_settings["range"]) - (abs(weapon_raycast.position.z - client_cb3d.position.z))))
#weapon_raycast.target_position = weapon_raycast.to_local(raycast.to_global(raycast.target_position) - weapon_raycast.position)
weapon_raycast.target_position.y += current_weapon_settings["spreading"] * randf() * sin(randf() * 2 * PI)
weapon_raycast.target_position.z += current_weapon_settings["spreading"] * randf() * cos(randf() * 2 * PI)
print(str(weapon_raycast.target_position))
weapon_raycast.force_raycast_update()
weapon_raycast.force_update_transform()
@ -226,7 +221,6 @@ func shot(client_id):
if (time_since_last_shot < current_weapon_settings["fireRate"] and client["last_shot"] > 0):
return
print(client["current_weapon"]["magazine"])
if (client["current_weapon"]["magazine"] == 0):
return
@ -286,8 +280,7 @@ func get_map(client_id):
##########################################CLIENT#######################
var player
var menu = preload("res://scenes/menu.tscn")
var test_map = preload("res://scenes/test_map.tscn")
var menu = preload("res://scenes/HUD/menu.tscn")
var current_map_instance
@rpc ("reliable", "call_remote")
@ -313,6 +306,22 @@ func despawn_puppet(internal_id):
func receive_map(p):
map_path = p
map_root_name = (map_path.split("/")[-1]).split(".")[0]
@rpc("authority", "reliable", "call_remote")
func switch_team(team):
pass
func spawn_player():
var player_node = player_model.instantiate()
var CB3D = player_node.find_child("CharacterBody3D")
var properties = player_script.new().properties.duplicate()
properties = player
properties["is_playable"] = true
properties["ready"] = true
CB3D.set_properties(properties)
current_map_instance.add_child(player_node)
func ConnectToServer(ip, port):
peer.create_client(ip, port)
multiplayer.multiplayer_peer = peer
@ -346,23 +355,17 @@ func _Connection_Succseeded():
await get_tree().create_timer(0.05).timeout # костыль # tp
rpc_id(1, "get_server_settings", multiplayer.get_unique_id())
var player_node = player_model.instantiate()
var CB3D = player_node.find_child("CharacterBody3D")
var properties = player_script.new().properties.duplicate()
properties = player
properties["is_playable"] = true
properties["ready"] = true
CB3D.set_properties(properties)
await spawn_player()
current_map_instance.add_child(player_node)
await get_tree().create_timer(0.05).timeout # костыль
#var choose_team_hud = preload("res://scenes/HUD/choose_team.tscn").instantiate()
#current_map_instance.add_child(choose_team_hud)
rpc_id(1, "client_ready", multiplayer.get_unique_id())
func _Server_Disconnected():
print("Server has disconnected")
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
get_tree().change_scene_to_file("res://scenes/menu.tscn")
get_tree().change_scene_to_file("res://scenes/HUD/menu.tscn")
multiplayer.multiplayer_peer = null
peer = ENetMultiplayerPeer.new()
multiplayer.multiplayer_peer = peer

View File

@ -94,16 +94,12 @@ func find_current_weapon_by_number(number):
return found_weapon
func _ready():
#if ($"..".name == "player"):
#properties["offline_mode"] = true
#properties["is_playable"] = true
#await Networking.StartServer("res://scenes/Map/OffisMi.tscn")
position = Vector3(0, 5, 0)
$"Head/Nickname".text = properties["nickname"]
if (!properties["is_playable"]): return
camera.make_current()
print("I am alive")
var hud = load("res://scenes/hud.tscn").instantiate()
var hud = load("res://scenes/HUD/hud.tscn").instantiate()
add_child(hud)
HUD = $"HUD"
healthBar = HUD.get_node("HealthBar")
@ -178,7 +174,6 @@ func _unhandled_input(event):
func _physics_process(delta):
if (!properties["is_playable"]): return
#if (game_settings == null and !properties["offline_mode"]): return
if (game_settings == null): return
if (multiplayer.multiplayer_peer == null):
properties["is_playable"] = false

11
scripts/Select.gd Normal file
View File

@ -0,0 +1,11 @@
extends Button
@onready var button = $"."
func _ready():
button.pressed.connect(self._button_pressed)
func _button_pressed():
if name == "Select_CS":
print("Selected CS")
elif name == "Select_OS":
print("Selected OS")