Importing Assets

linux
Sascha 2024-02-08 11:12:16 +07:00
parent 90d4a5dde7
commit 0e2d4f3636
12 changed files with 4276 additions and 70370 deletions

Binary file not shown.

@ -0,0 +1,34 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://ci23bi1nru1xm"
path="res://.godot/imported/Character.glb-9001666003762cb87d66fa9fa71230bd.scn"
[deps]
source_file="res://Assets/Character.glb"
dest_files=["res://.godot/imported/Character.glb-9001666003762cb87d66fa9fa71230bd.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: 2.6 MiB

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c0yndugon6lwq"
path.s3tc="res://.godot/imported/Character_Paladin_diffuse.png-34e7e2e35d7153cf44174bb6dc91c2fb.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "08dad13d18a3ee6dc4be544f4a8a7e42"
}
[deps]
source_file="res://Assets/Character_Paladin_diffuse.png"
dest_files=["res://.godot/imported/Character_Paladin_diffuse.png-34e7e2e35d7153cf44174bb6dc91c2fb.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://brox6qoemtyw0"
path.s3tc="res://.godot/imported/Character_Paladin_normal.png-c94c4cc493ba23270411f4050a7a728a.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "4b301f962a8310e25aec237e0d41c8d7"
}
[deps]
source_file="res://Assets/Character_Paladin_normal.png"
dest_files=["res://.godot/imported/Character_Paladin_normal.png-c94c4cc493ba23270411f4050a7a728a.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://Assets/Character_Paladin_normal.png"
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c7qr26036q2c2"
path="res://.godot/imported/Character_Paladin_specular.png-4c371b4e84408e7322a58551cfd91cf7.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "37fc3d027161252177524108ed8f7808"
}
[deps]
source_file="res://Assets/Character_Paladin_specular.png"
dest_files=["res://.godot/imported/Character_Paladin_specular.png-4c371b4e84408e7322a58551cfd91cf7.ctex"]
[params]
compress/mode=0
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=1

File diff suppressed because one or more lines are too long

@ -1,13 +1,16 @@
using Godot;
using System;
namespace DRPGActionGame.Player;
public partial class Player : CharacterBody3D
{
public const float Speed = 5.0f;
public const float JumpVelocity = 4.5f;
private const float SPEED = 5.0f;
private const float JUMP_VELOCITY = 4.5f;
// Get the gravity from the project settings to be synced with RigidBody nodes.
public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
private float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
[Export] private AnimationPlayer animationPlayer;
public override void _PhysicsProcess(double delta)
{
@ -19,7 +22,7 @@ public partial class Player : CharacterBody3D
// Handle Jump.
if (Input.IsActionJustPressed("ui_accept") && IsOnFloor())
velocity.Y = JumpVelocity;
velocity.Y = JUMP_VELOCITY;
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
@ -27,16 +30,17 @@ public partial class Player : CharacterBody3D
Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
if (direction != Vector3.Zero)
{
velocity.X = direction.X * Speed;
velocity.Z = direction.Z * Speed;
animationPlayer.Play("Walk");
velocity.X = direction.X * SPEED;
velocity.Z = direction.Z * SPEED;
}
else
{
velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed);
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, Speed);
else {
animationPlayer.Play("Idle");
velocity.X = Mathf.MoveToward(Velocity.X, 0, SPEED);
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, SPEED);
}
Velocity = velocity;
MoveAndSlide();
}
}
}

File diff suppressed because one or more lines are too long

@ -3,7 +3,6 @@
[ext_resource type="PackedScene" uid="uid://cqgw85i74nek0" path="res://Player/Player.tscn" id="1_ks6w4"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_lcthy"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_sl70d"]
@ -26,12 +25,9 @@ size = Vector3(50, 1, 50)
environment = SubResource("Environment_a428g")
[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 6.06111, 0)
shadow_enabled = true
[node name="Player" parent="." instance=ExtResource("1_ks6w4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.71919, 2.07103, 0)
[node name="Floor" type="StaticBody3D" parent="."]
[node name="MeshInstance3D" type="MeshInstance3D" parent="Floor"]
@ -40,3 +36,7 @@ mesh = SubResource("BoxMesh_fdw8w")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"]
shape = SubResource("BoxShape3D_aivjm")
[node name="Player" parent="." node_paths=PackedStringArray("animationPlayer") instance=ExtResource("1_ks6w4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.24748, 0)
animationPlayer = NodePath("Character/AnimationPlayer")