.
This commit is contained in:
parent
ee86cc2a3c
commit
9c2bfbb93c
76
assets/characters/npc.tscn
Normal file
76
assets/characters/npc.tscn
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
[gd_scene load_steps=12 format=3 uid="uid://cbfoxxoamehgg"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://src/viewport.gd" id="3_1olx4"]
|
||||||
|
[ext_resource type="SpineAtlasResource" uid="uid://bo3ljqyv75e4b" path="res://assets/characters/pasadena/spine.atlas" id="4_tbp5u"]
|
||||||
|
[ext_resource type="Script" path="res://src/spine_sprite.gd" id="5_f351d"]
|
||||||
|
[ext_resource type="SpineSkeletonFileResource" uid="uid://dy0llktw1x7i6" path="res://assets/characters/pasadena/spine.skel" id="5_k5je5"]
|
||||||
|
|
||||||
|
[sub_resource type="ViewportTexture" id="ViewportTexture_tue73"]
|
||||||
|
viewport_path = NodePath("MeshInstance3D/SubViewport")
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a31vv"]
|
||||||
|
transparency = 1
|
||||||
|
blend_mode = 4
|
||||||
|
no_depth_test = true
|
||||||
|
diffuse_mode = 3
|
||||||
|
specular_mode = 1
|
||||||
|
disable_ambient_light = true
|
||||||
|
disable_fog = true
|
||||||
|
vertex_color_use_as_albedo = true
|
||||||
|
albedo_texture = SubResource("ViewportTexture_tue73")
|
||||||
|
metallic = 0.55
|
||||||
|
billboard_mode = 1
|
||||||
|
|
||||||
|
[sub_resource type="QuadMesh" id="QuadMesh_iwcmf"]
|
||||||
|
|
||||||
|
[sub_resource type="SpineAnimationMix" id="SpineAnimationMix_piuq6"]
|
||||||
|
from = "animation"
|
||||||
|
to = "animation"
|
||||||
|
|
||||||
|
[sub_resource type="SpineSkeletonDataResource" id="SpineSkeletonDataResource_ufcij"]
|
||||||
|
atlas_res = ExtResource("4_tbp5u")
|
||||||
|
skeleton_file_res = ExtResource("5_k5je5")
|
||||||
|
animation_mixes = [SubResource("SpineAnimationMix_piuq6")]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_wn1m5"]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_cbp6h"]
|
||||||
|
|
||||||
|
[node name="NPC" type="CharacterBody3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.48192, 0)
|
||||||
|
axis_lock_angular_x = true
|
||||||
|
axis_lock_angular_y = true
|
||||||
|
axis_lock_angular_z = true
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
|
||||||
|
material_override = SubResource("StandardMaterial3D_a31vv")
|
||||||
|
cast_shadow = 0
|
||||||
|
gi_mode = 0
|
||||||
|
mesh = SubResource("QuadMesh_iwcmf")
|
||||||
|
script = ExtResource("3_1olx4")
|
||||||
|
|
||||||
|
[node name="SubViewport" type="SubViewport" parent="MeshInstance3D"]
|
||||||
|
transparent_bg = true
|
||||||
|
positional_shadow_atlas_quad_0 = 0
|
||||||
|
canvas_cull_mask = 4294966273
|
||||||
|
size = Vector2i(3000, 3000)
|
||||||
|
|
||||||
|
[node name="SpineSprite" type="SpineSprite" parent="MeshInstance3D/SubViewport"]
|
||||||
|
light_mask = 0
|
||||||
|
position = Vector2(42, 256)
|
||||||
|
skeleton_data_res = SubResource("SpineSkeletonDataResource_ufcij")
|
||||||
|
preview_skin = "default"
|
||||||
|
preview_animation = "animation"
|
||||||
|
preview_frame = true
|
||||||
|
preview_time = 0.0
|
||||||
|
script = ExtResource("5_f351d")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0)
|
||||||
|
shape = SubResource("CylinderShape3D_wn1m5")
|
||||||
|
|
||||||
|
[node name="Area3D" type="Area3D" parent="." groups=["Player"]]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||||
|
shape = SubResource("CylinderShape3D_cbp6h")
|
||||||
36
assets/characters/pasadena/spine.atlas
Normal file
36
assets/characters/pasadena/spine.atlas
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
spine.png
|
||||||
|
size:1996,1722
|
||||||
|
filter:Linear,Linear
|
||||||
|
Paint Layer 4
|
||||||
|
bounds:2,1715,5,7
|
||||||
|
rotate:90
|
||||||
|
back arm
|
||||||
|
bounds:11,1361,359,949
|
||||||
|
rotate:90
|
||||||
|
back shoe
|
||||||
|
bounds:2,941,418,598
|
||||||
|
rotate:90
|
||||||
|
boobs
|
||||||
|
bounds:962,1303,577,417
|
||||||
|
front shoe
|
||||||
|
bounds:1541,1147,573,453
|
||||||
|
rotate:90
|
||||||
|
hair
|
||||||
|
bounds:2,2,894,739
|
||||||
|
head
|
||||||
|
bounds:1284,489,696,656
|
||||||
|
tail
|
||||||
|
bounds:602,743,558,680
|
||||||
|
rotate:90
|
||||||
|
|
||||||
|
spine_2.png
|
||||||
|
size:2027,1625
|
||||||
|
filter:Linear,Linear
|
||||||
|
back leg
|
||||||
|
bounds:721,1070,553,1304
|
||||||
|
rotate:90
|
||||||
|
body
|
||||||
|
bounds:721,26,1042,1198
|
||||||
|
rotate:90
|
||||||
|
front leg
|
||||||
|
bounds:2,2,717,1621
|
||||||
15
assets/characters/pasadena/spine.atlas.import
Normal file
15
assets/characters/pasadena/spine.atlas.import
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="spine.atlas"
|
||||||
|
type="SpineAtlasResource"
|
||||||
|
uid="uid://bo3ljqyv75e4b"
|
||||||
|
path="res://.godot/imported/spine.atlas-ed2b346c97cec6d1dc959b99f669e60c.spatlas"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/pasadena/spine.atlas"
|
||||||
|
dest_files=["res://.godot/imported/spine.atlas-ed2b346c97cec6d1dc959b99f669e60c.spatlas"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
normal_map_prefix="n"
|
||||||
BIN
assets/characters/pasadena/spine.png
Normal file
BIN
assets/characters/pasadena/spine.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 709 KiB |
34
assets/characters/pasadena/spine.png.import
Normal file
34
assets/characters/pasadena/spine.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://56k0q57ja83x"
|
||||||
|
path="res://.godot/imported/spine.png-9b174fb346cacc3fa8ed6a403536a860.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/pasadena/spine.png"
|
||||||
|
dest_files=["res://.godot/imported/spine.png-9b174fb346cacc3fa8ed6a403536a860.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=false
|
||||||
|
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
|
||||||
BIN
assets/characters/pasadena/spine.skel
Normal file
BIN
assets/characters/pasadena/spine.skel
Normal file
Binary file not shown.
14
assets/characters/pasadena/spine.skel.import
Normal file
14
assets/characters/pasadena/spine.skel.import
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="spine.skel"
|
||||||
|
type="SpineSkeletonFileResource"
|
||||||
|
uid="uid://dy0llktw1x7i6"
|
||||||
|
path="res://.godot/imported/spine.skel-332b4935e83ec0a0fab3586b58715043.spskel"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/pasadena/spine.skel"
|
||||||
|
dest_files=["res://.godot/imported/spine.skel-332b4935e83ec0a0fab3586b58715043.spskel"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
8
assets/characters/pasadena/spine.tres
Normal file
8
assets/characters/pasadena/spine.tres
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=3 uid="uid://co37n66nu3fou"]
|
||||||
|
|
||||||
|
[ext_resource type="SpineAtlasResource" uid="uid://bo3ljqyv75e4b" path="res://assets/characters/pasadena/spine.atlas" id="1_qcbfr"]
|
||||||
|
[ext_resource type="SpineSkeletonFileResource" uid="uid://dy0llktw1x7i6" path="res://assets/characters/pasadena/spine.skel" id="2_hiqtl"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
atlas_res = ExtResource("1_qcbfr")
|
||||||
|
skeleton_file_res = ExtResource("2_hiqtl")
|
||||||
BIN
assets/characters/pasadena/spine_2.png
Normal file
BIN
assets/characters/pasadena/spine_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 656 KiB |
34
assets/characters/pasadena/spine_2.png.import
Normal file
34
assets/characters/pasadena/spine_2.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cx4w3t8bytwp5"
|
||||||
|
path="res://.godot/imported/spine_2.png-2313c2edf530b4b75c392b1bbf0e8159.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/pasadena/spine_2.png"
|
||||||
|
dest_files=["res://.godot/imported/spine_2.png-2313c2edf530b4b75c392b1bbf0e8159.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=false
|
||||||
|
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
|
||||||
@ -5,6 +5,8 @@ const JUMP_VELOCITY = 200
|
|||||||
|
|
||||||
signal test
|
signal test
|
||||||
|
|
||||||
|
var last_direction:= Vector3.ONE
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
# Add the gravity.
|
# Add the gravity.
|
||||||
if not is_on_floor():
|
if not is_on_floor():
|
||||||
@ -14,5 +16,9 @@ func _physics_process(delta: float) -> void:
|
|||||||
|
|
||||||
if Input.is_key_pressed(KEY_SPACE) and is_on_floor():
|
if Input.is_key_pressed(KEY_SPACE) and is_on_floor():
|
||||||
self.velocity.y = delta * JUMP_VELOCITY
|
self.velocity.y = delta * JUMP_VELOCITY
|
||||||
|
var i = int(Input.get_axis("move_left", "move_right"))
|
||||||
|
if i:
|
||||||
|
last_direction = Vector3(i, 1, 1)
|
||||||
|
$MeshInstance3D.set_scale(last_direction)
|
||||||
|
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|||||||
@ -6,12 +6,12 @@
|
|||||||
[ext_resource type="Script" path="res://src/camera_3d.gd" id="2_cjtsr"]
|
[ext_resource type="Script" path="res://src/camera_3d.gd" id="2_cjtsr"]
|
||||||
[ext_resource type="Script" path="res://src/spine_sprite.gd" id="4_bwb5d"]
|
[ext_resource type="Script" path="res://src/spine_sprite.gd" id="4_bwb5d"]
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ver3c"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_d2fqw"]
|
||||||
viewport_path = NodePath("MeshInstance3D/SubViewport")
|
viewport_path = NodePath("MeshInstance3D/SubViewport")
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a31vv"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a31vv"]
|
||||||
transparency = 1
|
transparency = 1
|
||||||
albedo_texture = SubResource("ViewportTexture_ver3c")
|
albedo_texture = SubResource("ViewportTexture_d2fqw")
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_iwcmf"]
|
[sub_resource type="QuadMesh" id="QuadMesh_iwcmf"]
|
||||||
|
|
||||||
@ -29,8 +29,9 @@ script = ExtResource("1_fwkda")
|
|||||||
[node name="Camera3D" type="Camera3D" parent="."]
|
[node name="Camera3D" type="Camera3D" parent="."]
|
||||||
transform = Transform3D(0.999987, -0.00490892, -0.00171441, 0.00514322, 0.982274, 0.187381, 0.000764184, -0.187388, 0.982286, -0.015, 1.154, 5.342)
|
transform = Transform3D(0.999987, -0.00490892, -0.00171441, 0.00514322, 0.982274, 0.187381, 0.000764184, -0.187388, 0.982286, -0.015, 1.154, 5.342)
|
||||||
current = true
|
current = true
|
||||||
fov = 33.4
|
fov = 19.0
|
||||||
size = 2.0
|
size = 2.0
|
||||||
|
far = 1000.0
|
||||||
script = ExtResource("2_cjtsr")
|
script = ExtResource("2_cjtsr")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
@ -48,7 +49,7 @@ size = Vector2i(1024, 1024)
|
|||||||
size_2d_override_stretch = true
|
size_2d_override_stretch = true
|
||||||
|
|
||||||
[node name="SpineSprite" type="SpineSprite" parent="MeshInstance3D/SubViewport"]
|
[node name="SpineSprite" type="SpineSprite" parent="MeshInstance3D/SubViewport"]
|
||||||
position = Vector2(512, 1024)
|
position = Vector2(512, 887)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
skeleton_data_res = ExtResource("2_byycm")
|
skeleton_data_res = ExtResource("2_byycm")
|
||||||
preview_skin = "default"
|
preview_skin = "default"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=20 format=3 uid="uid://b2b0sgltiefki"]
|
[gd_scene load_steps=21 format=3 uid="uid://b2b0sgltiefki"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://assets/levels/level_1.gd" id="1_4n7jv"]
|
[ext_resource type="Script" path="res://assets/levels/level_1.gd" id="1_4n7jv"]
|
||||||
[ext_resource type="Texture2D" uid="uid://h04a4ju855bp" path="res://assets/objects/kenney_prototype-textures/PNG/Dark/texture_02.png" id="1_xris1"]
|
[ext_resource type="Texture2D" uid="uid://h04a4ju855bp" path="res://assets/objects/kenney_prototype-textures/PNG/Dark/texture_02.png" id="1_xris1"]
|
||||||
@ -8,6 +8,7 @@
|
|||||||
[ext_resource type="Script" path="res://src/viewport.gd" id="6_uuo0x"]
|
[ext_resource type="Script" path="res://src/viewport.gd" id="6_uuo0x"]
|
||||||
[ext_resource type="Texture2D" uid="uid://x60cxv42nmsa" path="res://assets/bubbles.png" id="7_el3mb"]
|
[ext_resource type="Texture2D" uid="uid://x60cxv42nmsa" path="res://assets/bubbles.png" id="7_el3mb"]
|
||||||
[ext_resource type="Shader" path="res://assets/levels/test.gdshader" id="8_68tud"]
|
[ext_resource type="Shader" path="res://assets/levels/test.gdshader" id="8_68tud"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cbfoxxoamehgg" path="res://assets/characters/npc.tscn" id="9_kit50"]
|
||||||
|
|
||||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_ulx7c"]
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_ulx7c"]
|
||||||
sky_top_color = Color(0.129, 0.129, 0.129, 1)
|
sky_top_color = Color(0.129, 0.129, 0.129, 1)
|
||||||
@ -35,14 +36,14 @@ size = Vector2(10, 5)
|
|||||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_flcen"]
|
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_flcen"]
|
||||||
data = PackedVector3Array(5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5)
|
data = PackedVector3Array(5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5)
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ldt4a"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_80n1l"]
|
||||||
viewport_path = NodePath("MeshInstance3D/SubViewport")
|
viewport_path = NodePath("MeshInstance3D/SubViewport")
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mdr1l"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mdr1l"]
|
||||||
transparency = 2
|
transparency = 2
|
||||||
alpha_scissor_threshold = 0.5
|
alpha_scissor_threshold = 0.5
|
||||||
alpha_antialiasing_mode = 0
|
alpha_antialiasing_mode = 0
|
||||||
albedo_texture = SubResource("ViewportTexture_ldt4a")
|
albedo_texture = SubResource("ViewportTexture_80n1l")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lrfyr"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lrfyr"]
|
||||||
|
|
||||||
@ -105,3 +106,6 @@ script = ExtResource("6_uuo0x")
|
|||||||
material = SubResource("ShaderMaterial_d4amb")
|
material = SubResource("ShaderMaterial_d4amb")
|
||||||
offset_right = 512.0
|
offset_right = 512.0
|
||||||
offset_bottom = 512.0
|
offset_bottom = 512.0
|
||||||
|
|
||||||
|
[node name="NPC" parent="." instance=ExtResource("9_kit50")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.565993, 0.48192, -0.421152)
|
||||||
|
|||||||
@ -1,16 +1,11 @@
|
|||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass # Replace with function body.
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _on_area_3d_area_entered(area: Area3D) -> void:
|
func _on_area_3d_area_entered(area: Area3D) -> void:
|
||||||
if area.is_in_group("Player"):
|
if area.is_in_group("Player"):
|
||||||
#get_tree().change_scene_to_packed()
|
#get_tree().change_scene_to_packed()
|
||||||
|
|||||||
@ -5,7 +5,7 @@ extends MeshInstance3D
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
if material_override != null:
|
if material_override != null:
|
||||||
material_override.albedo_texture = $SubViewport.get_texture()
|
material_override.albedo_texture = $SubViewport.get_texture()
|
||||||
|
|
||||||
#func _process(delta):
|
#func _process(delta):
|
||||||
#self.look_at(camera.global_position, Vector3.UP, true)
|
#self.look_at(camera.global_position, Vector3.UP, true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user