commit 89e0b55794a8163eacee570ca28992e73c173f62 Author: des <18638715007@163.com> Date: Sun Jan 4 19:35:08 2026 +0800 初始化提交 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..970d9f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.godot/ +.import/ diff --git a/art/House In a Forest Loop.ogg b/art/House In a Forest Loop.ogg new file mode 100644 index 0000000..ece3640 Binary files /dev/null and b/art/House In a Forest Loop.ogg differ diff --git a/art/House In a Forest Loop.ogg.import b/art/House In a Forest Loop.ogg.import new file mode 100644 index 0000000..d2f9572 --- /dev/null +++ b/art/House In a Forest Loop.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://ds2ndihmos8m8" +path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr" + +[deps] + +source_file="res://art/House In a Forest Loop.ogg" +dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/art/body.material b/art/body.material new file mode 100644 index 0000000..b48a9a6 Binary files /dev/null and b/art/body.material differ diff --git a/art/eye.material b/art/eye.material new file mode 100644 index 0000000..cc5c787 Binary files /dev/null and b/art/eye.material differ diff --git a/art/mob.glb b/art/mob.glb new file mode 100644 index 0000000..82cded4 Binary files /dev/null and b/art/mob.glb differ diff --git a/art/mob.glb.import b/art/mob.glb.import new file mode 100644 index 0000000..9f090f9 --- /dev/null +++ b/art/mob.glb.import @@ -0,0 +1,42 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dkmuju2nr42x4" +path="res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn" + +[deps] + +source_file="res://art/mob.glb" +dest_files=["res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn"] + +[params] + +nodes/root_type="Node3D" +nodes/root_name="Scene Root" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=0 +meshes/lightmap_texel_size=0.1 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=15 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" +_subresources={} +gltf/naming_version=0 +gltf/embedded_image_handling=1 diff --git a/art/mob_body.material b/art/mob_body.material new file mode 100644 index 0000000..78cc1e3 Binary files /dev/null and b/art/mob_body.material differ diff --git a/art/mob_eye.material b/art/mob_eye.material new file mode 100644 index 0000000..cb88f4f Binary files /dev/null and b/art/mob_eye.material differ diff --git a/art/player.glb b/art/player.glb new file mode 100644 index 0000000..9ba67bc Binary files /dev/null and b/art/player.glb differ diff --git a/art/player.glb.import b/art/player.glb.import new file mode 100644 index 0000000..036b15d --- /dev/null +++ b/art/player.glb.import @@ -0,0 +1,42 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dolueyckipny0" +path="res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn" + +[deps] + +source_file="res://art/player.glb" +dest_files=["res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn"] + +[params] + +nodes/root_type="Node3D" +nodes/root_name="Scene Root" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=0 +meshes/lightmap_texel_size=0.1 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=15 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" +_subresources={} +gltf/naming_version=0 +gltf/embedded_image_handling=1 diff --git a/art/pupil.material b/art/pupil.material new file mode 100644 index 0000000..6bb04fa Binary files /dev/null and b/art/pupil.material differ diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..eb4accc --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,3 @@ +[gd_resource type="AudioBusLayout" format=2] + +[resource] diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..b5f71ae --- /dev/null +++ b/default_env.tres @@ -0,0 +1,4 @@ +[gd_resource type="Environment" format=2] + +[resource] +ambient_light_color = Color( 0.341176, 0.341176, 0.466667, 1 ) diff --git a/fonts/LICENSE.txt b/fonts/LICENSE.txt new file mode 100644 index 0000000..399aae6 --- /dev/null +++ b/fonts/LICENSE.txt @@ -0,0 +1,43 @@ +Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +—————————————————————————————- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +—————————————————————————————- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +“Reserved Font Name” refers to any names specified as such after the copyright statement(s). + +“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/Montserrat-Medium.ttf b/fonts/Montserrat-Medium.ttf new file mode 100644 index 0000000..db5b1af Binary files /dev/null and b/fonts/Montserrat-Medium.ttf differ diff --git a/fonts/Montserrat-Medium.ttf.import b/fonts/Montserrat-Medium.ttf.import new file mode 100644 index 0000000..ecbb6ed --- /dev/null +++ b/fonts/Montserrat-Medium.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://wr6v0asbbmc" +path="res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata" + +[deps] + +source_file="res://fonts/Montserrat-Medium.ttf" +dest_files=["res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..e0af83e Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..e060a78 --- /dev/null +++ b/icon.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1wlnobr6f28y" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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=1 diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..5b41fe1 --- /dev/null +++ b/main.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=4 format=3 uid="uid://2wap0283yk0r"] + +[ext_resource type="PackedScene" uid="uid://tr3uhf2keqox" path="res://palyer.tscn" id="1_ig7tw"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_7dm0k"] +size = Vector3(33.276, 1, 33.302666) + +[sub_resource type="BoxMesh" id="BoxMesh_ig7tw"] +size = Vector3(30, 1, 30) + +[node name="main" type="Node3D"] + +[node name="StaticBody3D" type="StaticBody3D" parent="."] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.089538574, -1, -0.07180405) +shape = SubResource("BoxShape3D_7dm0k") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.10932243, -0.9618329, -0.0386405) +mesh = SubResource("BoxMesh_ig7tw") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.93889695, 0.25740308, -0.22850859, 0.08871657, 0.8224301, 0.56190586, 0.3325687, 0.50729924, -0.79501307, -34.132164, 26.13887, -10.404114) + +[node name="palyer" parent="." instance=ExtResource("1_ig7tw")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.07599962, 0.20518756, -0.24805403) + +[node name="Marker3D" type="Marker3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.41959667, 2.5266955, 0) + +[node name="Camera3D" type="Camera3D" parent="Marker3D"] +transform = Transform3D(1, 0, 0, 0, 0.7282155, 0.6853483, 0, -0.6853483, 0.7282155, 1.7961426, 34.414253, 42.3816) +fov = 20.0 +size = 15.939418 diff --git a/palyer.gd b/palyer.gd new file mode 100644 index 0000000..dcb4710 --- /dev/null +++ b/palyer.gd @@ -0,0 +1,29 @@ +extends CharacterBody3D + +var speed = 14 + +var fall_acceleration = 75 + +var target_velocity = Vector3.ZERO + +func _physics_process(delta: float): + var direction = Vector3.ZERO + if Input.is_action_pressed("move_forward"): + direction.z -= 1 + if Input.is_action_pressed("move_back"): + direction.z += 1 + if Input.is_action_pressed("move_left"): + direction.x -= 1 + if Input.is_action_pressed("move_right"): + direction.x += 1 + if direction != Vector3.ZERO: + direction = direction.normalized() + $pivot.basis = Basis.looking_at(direction) + target_velocity.x = direction.x * speed + target_velocity.z = direction.z * speed + + if !is_on_floor(): + target_velocity.y = target_velocity.y - ( fall_acceleration * delta ) + + velocity = target_velocity + move_and_slide() diff --git a/palyer.gd.uid b/palyer.gd.uid new file mode 100644 index 0000000..8fc5edd --- /dev/null +++ b/palyer.gd.uid @@ -0,0 +1 @@ +uid://di50p6h46nmlw diff --git a/palyer.tscn b/palyer.tscn new file mode 100644 index 0000000..ff98565 --- /dev/null +++ b/palyer.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=4 format=3 uid="uid://tr3uhf2keqox"] + +[ext_resource type="PackedScene" uid="uid://dolueyckipny0" path="res://art/player.glb" id="1_ed8k8"] +[ext_resource type="Script" uid="uid://di50p6h46nmlw" path="res://palyer.gd" id="1_vgmp0"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_vgmp0"] +size = Vector3(1.954834, 3.081192, 1.1972656) + +[node name="palyer" type="CharacterBody3D"] +script = ExtResource("1_vgmp0") + +[node name="pivot" type="Node3D" parent="."] + +[node name="player" parent="pivot" instance=ExtResource("1_ed8k8")] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.0023910538, 0.99999714, 0, -0.99999714, 0.0023910538, 0.0345459, 0.12650633, 0.40051335) +shape = SubResource("BoxShape3D_vgmp0") diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..f4c05cb --- /dev/null +++ b/project.godot @@ -0,0 +1,57 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Squash the Creeps (3D)" +run/main_scene="uid://2wap0283yk0r" +config/features=PackedStringArray("4.5") +config/icon="res://icon.png" + +[dotnet] + +project/assembly_name="Squash the Creeps (3D)" + +[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":4194320,"key_label":0,"unicode":0,"location":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":87,"key_label":0,"unicode":119,"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) +, 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":4194319,"key_label":0,"unicode":0,"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":4194321,"key_label":0,"unicode":0,"location":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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +] +} +move_back={ +"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) +, 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +jump={ +"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +] +} + +[rendering] + +quality/driver/driver_name="GLES2" +quality/filters/msaa=3