add new monster and falling log
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-10.png-924b68af7d4d0e54ea90881797173222.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-10.png"
|
|
||||||
dest_files=[ "res://.import/frame-10.png-924b68af7d4d0e54ea90881797173222.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-4.png-eb3376ebb02641a1229324c0f673ac10.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-4.png"
|
|
||||||
dest_files=[ "res://.import/frame-4.png-eb3376ebb02641a1229324c0f673ac10.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 15 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-5.png-a1d1af4294a2c9641e7092b4ddb6a526.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-5.png"
|
|
||||||
dest_files=[ "res://.import/frame-5.png-a1d1af4294a2c9641e7092b4ddb6a526.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 14 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-6.png-35216400c9df3486f1f9fa79f1302275.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-6.png"
|
|
||||||
dest_files=[ "res://.import/frame-6.png-35216400c9df3486f1f9fa79f1302275.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 15 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-7.png-7d48b23f03ea4fb83447691fce055632.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-7.png"
|
|
||||||
dest_files=[ "res://.import/frame-7.png-7d48b23f03ea4fb83447691fce055632.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 15 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-8.png-e863ecfe2c378b53f379c91aa34877fb.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-8.png"
|
|
||||||
dest_files=[ "res://.import/frame-8.png-e863ecfe2c378b53f379c91aa34877fb.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 15 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-9.png-21b9aec41427f14b28c0cedb2deb17fe.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-9.png"
|
|
||||||
dest_files=[ "res://.import/frame-9.png-21b9aec41427f14b28c0cedb2deb17fe.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 28 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-1.png-650c3bba4e90ae6ef12f070af767e9c1.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-1.png"
|
|
||||||
dest_files=[ "res://.import/frame-1.png-650c3bba4e90ae6ef12f070af767e9c1.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 22 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-2.png-81870614b1a482614fb0b51639feb20b.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-2.png"
|
|
||||||
dest_files=[ "res://.import/frame-2.png-81870614b1a482614fb0b51639feb20b.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 18 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-3.png-d1485ff2f003637fab590d3117f014fc.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-3.png"
|
|
||||||
dest_files=[ "res://.import/frame-3.png-d1485ff2f003637fab590d3117f014fc.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 14 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-4.png-9ae5122e60e89b233b7c05b19e1113fd.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-4.png"
|
|
||||||
dest_files=[ "res://.import/frame-4.png-9ae5122e60e89b233b7c05b19e1113fd.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 6.4 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-5.png-70df9bc94ee58dab4d59a5e68e5fe4f6.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-5.png"
|
|
||||||
dest_files=[ "res://.import/frame-5.png-70df9bc94ee58dab4d59a5e68e5fe4f6.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Before Width: | Height: | Size: 4.9 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/frame-6.png-ba96fa01300422c7a0872b62675d3556.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/stomped/frame-6.png"
|
|
||||||
dest_files=[ "res://.import/frame-6.png-ba96fa01300422c7a0872b62675d3556.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
|
@ -6,15 +6,21 @@ func _process(delta):
|
||||||
velocity.x = speed
|
velocity.x = speed
|
||||||
if not $RayBottomRight.is_colliding():
|
if not $RayBottomRight.is_colliding():
|
||||||
velocity.x = -speed
|
velocity.x = -speed
|
||||||
if $RayPlayerLeft.is_colliding():
|
|
||||||
var collider = $RayPlayerLeft.get_collider()
|
|
||||||
collider.monster_hit(-speed, DAMAGE)
|
|
||||||
if $RayPlayerRight.is_colliding():
|
|
||||||
var collider = $RayPlayerRight.get_collider()
|
|
||||||
collider.monster_hit(speed, DAMAGE)
|
|
||||||
|
|
||||||
func stomped_on_head():
|
func stomped_on_head():
|
||||||
if not $RayPlayerLeft.is_colliding() and not $RayPlayerRight.is_colliding():
|
if not $RayPlayerLeft.is_colliding() and not $RayPlayerRight.is_colliding():
|
||||||
health = 0
|
health = 0
|
||||||
$Sprite.animation = "stomped"
|
$Sprite.animation = "stomped"
|
||||||
$StampedSound.play()
|
$StampedSound.play()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_PlayerCollision(body):
|
||||||
|
if $Collision.disabled == false:
|
||||||
|
if body.velocity.x > 0:
|
||||||
|
body.monster_hit(-speed, damage)
|
||||||
|
elif body.velocity.x < 0:
|
||||||
|
body.monster_hit(speed, damage)
|
||||||
|
elif velocity and velocity.x > 0:
|
||||||
|
body.monster_hit(speed, damage)
|
||||||
|
elif velocity and velocity.x < 0:
|
||||||
|
body.monster_hit(-speed, damage)
|
||||||
|
|
|
@ -43,7 +43,7 @@ script = ExtResource( 2 )
|
||||||
scale = Vector2( 0.2, 0.2 )
|
scale = Vector2( 0.2, 0.2 )
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
animation = "idle"
|
animation = "idle"
|
||||||
frame = 1
|
frame = 6
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||||
|
@ -75,3 +75,13 @@ cast_to = Vector2( 10, 0 )
|
||||||
[node name="StampedSound" type="AudioStreamPlayer2D" parent="."]
|
[node name="StampedSound" type="AudioStreamPlayer2D" parent="."]
|
||||||
stream = ExtResource( 16 )
|
stream = ExtResource( 16 )
|
||||||
volume_db = 10.0
|
volume_db = 10.0
|
||||||
|
|
||||||
|
[node name="PlayerCollision" type="Area2D" parent="."]
|
||||||
|
collision_layer = 0
|
||||||
|
|
||||||
|
[node name="Collision" type="CollisionShape2D" parent="PlayerCollision"]
|
||||||
|
position = Vector2( 0.5, 2.5 )
|
||||||
|
scale = Vector2( 1.2, 1.2 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="PlayerCollision" to="." method="_on_PlayerCollision"]
|
||||||
|
|
59
objects/characters/monsters/02/assets/hole.svg
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="69.999985"
|
||||||
|
height="16.100334"
|
||||||
|
viewBox="0 0 18.520829 4.2598801"
|
||||||
|
version="1.1"
|
||||||
|
id="svg3092"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
sodipodi:docname="hole.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview3094"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.914906"
|
||||||
|
inkscape:cx="-27.325211"
|
||||||
|
inkscape:cy="126.78898"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1367"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs3089" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Ebene 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-96.58379,-114.70351)">
|
||||||
|
<g
|
||||||
|
id="g3232">
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#bbcbcc"
|
||||||
|
d="m 112.03546,114.7036 h 0.51593 q 2.55323,0 2.55323,2.56646 v 0.39687 q -0.0661,-2.43416 -2.55323,-2.43416 H 99.137019 q -1.918229,0 -2.394479,1.4552 -0.145521,0.42334 -0.15875,0.97896 v -0.39687 -0.0662 q 0,-0.27781 0.03969,-0.51594 l 0.02646,-0.11906 0.01323,-0.11906 0.01323,-0.0265 q 0.370417,-1.71979 2.460625,-1.71979 h 0.515937 12.382508"
|
||||||
|
id="path1293"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#acc0c1"
|
||||||
|
d="m 115.10462,117.66693 v 1.29646 H 96.58379 v -1.29646 q 0.01323,-0.55562 0.15875,-0.97896 0.47625,-1.4552 2.394479,-1.4552 h 13.414371 q 2.48709,0 2.55323,2.43416"
|
||||||
|
id="path1295"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/frame-2.png-d84a37f4a00a76602e3799f601c5844f.stex"
|
path="res://.import/hole.svg-a380e9e33c033412e22a568adddf345d.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-2.png"
|
source_file="res://objects/characters/monsters/02/assets/hole.svg"
|
||||||
dest_files=[ "res://.import/frame-2.png-d84a37f4a00a76602e3799f601c5844f.stex" ]
|
dest_files=[ "res://.import/hole.svg-a380e9e33c033412e22a568adddf345d.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
71
objects/characters/monsters/02/assets/monster_02.svg
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="48"
|
||||||
|
height="146.00009"
|
||||||
|
viewBox="0 0 12.7 38.629191"
|
||||||
|
version="1.1"
|
||||||
|
id="svg2868"
|
||||||
|
sodipodi:docname="monster_02.svg"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview2870"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="3.659624"
|
||||||
|
inkscape:cx="11.749841"
|
||||||
|
inkscape:cy="150.28866"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1367"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2865" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Ebene 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-118.87006,-111.68929)">
|
||||||
|
<g
|
||||||
|
id="g3018">
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#f77c2b"
|
||||||
|
d="m 131.57006,118.35681 q -0.0529,-2.51354 -1.85209,-4.29948 l -0.0397,-0.0397 q -1.86532,-1.79917 -4.445,-1.79917 h -0.0132 q -2.61938,0 -4.48469,1.83885 -1.30969,1.29646 -1.69333,2.96334 -0.15875,0.635 -0.17198,1.33614 v -0.39687 q 0,-0.46302 0.0661,-0.91282 0.27782,-2.01083 1.79917,-3.51895 1.86531,-1.83886 4.48469,-1.83886 h 0.0132 q 2.61937,0 4.48468,1.83886 l 0.34396,0.37041 q 1.50813,1.71979 1.50813,4.06136 v 0.39687"
|
||||||
|
id="path2644"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#e86a17"
|
||||||
|
d="m 131.57006,118.35681 v 31.96167 h -12.7 v -31.96167 q 0.0132,-0.70114 0.17198,-1.33614 0.38364,-1.66688 1.69333,-2.96334 1.86531,-1.83885 4.48469,-1.83885 h 0.0132 q 2.57968,0 4.445,1.79917 l 0.0397,0.0397 q 1.79917,1.78594 1.85209,4.29948"
|
||||||
|
id="path2646"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#af4e0e"
|
||||||
|
d="m 128.43475,119.62681 q 0.43656,0.43656 0.43656,1.00542 0,0.58208 -0.43656,0.97896 -0.41011,0.4101 -0.97896,0.4101 -0.58209,0 -1.03188,-0.4101 -0.38364,-0.39688 -0.38364,-0.97896 l 0.0132,-0.2249 2.32833,-0.83343 0.0529,0.0529 m -4.60375,3.50573 q -0.27782,0.18521 -0.37042,0.43656 l -0.11906,0.14552 -0.2249,0.0529 -0.17198,-0.14552 q -0.0529,-0.10583 -0.0265,-0.2249 0.13229,-0.42333 0.51594,-0.71437 0.635,-0.48948 1.46844,-0.48948 0.85989,0 1.45521,0.48948 0.38364,0.29104 0.52916,0.68792 0.0529,0.0926 0,0.22489 l -0.14552,0.14552 q -0.11906,0.0529 -0.21166,0 l -0.17198,-0.14552 q -0.10584,-0.27781 -0.34396,-0.46302 -0.47625,-0.37042 -1.11125,-0.37042 -0.635,0 -1.07156,0.37042 m 0,-2.50031 q 0,0.58208 -0.4498,0.97896 -0.4101,0.4101 -0.97895,0.4101 -0.60855,0 -1.01865,-0.4101 -0.39688,-0.39688 -0.39688,-0.97896 0,-0.5424 0.37042,-0.99219 l 2.42094,0.64823 0.0529,0.34396"
|
||||||
|
id="path2648"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#f0711c"
|
||||||
|
d="m 129.58568,116.87515 q 0,0.37041 -0.26458,0.635 -0.26458,0.26458 -0.635,0.26458 -0.37042,0 -0.635,-0.26458 -0.26458,-0.26459 -0.26458,-0.635 0,-0.37042 0.26458,-0.635 0.26458,-0.26459 0.635,-0.26459 0.37042,0 0.635,0.26459 0.26458,0.26458 0.26458,0.635 m -2.83104,-0.5424 q 0,0.44979 -0.3175,0.75406 -0.30427,0.3175 -0.75406,0.3175 -0.44979,0 -0.76729,-0.3175 -0.30427,-0.30427 -0.30427,-0.75406 0,-0.44979 0.30427,-0.76729 0.3175,-0.30427 0.76729,-0.30427 0.44979,0 0.75406,0.30427 0.3175,0.3175 0.3175,0.76729 m 0.29104,2.06375 q 0.11907,0.11906 0.11907,0.27781 0,0.15875 -0.11907,0.26459 -0.10583,0.11906 -0.26458,0.11906 -0.15875,0 -0.27781,-0.11906 -0.10584,-0.10584 -0.10584,-0.26459 0,-0.15875 0.10584,-0.27781 0.11906,-0.10583 0.27781,-0.10583 0.15875,0 0.26458,0.10583 m -7.13052,11.05958 q 0,-0.29104 0.21167,-0.50271 0.21167,-0.21166 0.50271,-0.21166 0.29104,0 0.50271,0.21166 0.21166,0.21167 0.21166,0.50271 0,0.29104 -0.21166,0.50271 -0.21167,0.21167 -0.50271,0.21167 -0.29104,0 -0.50271,-0.21167 -0.21167,-0.21167 -0.21167,-0.50271 m 2.46063,1.98438 q -0.27782,-0.27781 -0.27782,-0.67469 0,-0.39687 0.27782,-0.68792 0.29104,-0.27781 0.68791,-0.27781 0.39688,0 0.67469,0.27781 0.29104,0.29105 0.29104,0.68792 0,0.39688 -0.29104,0.67469 -0.27781,0.29104 -0.67469,0.29104 -0.39687,0 -0.68791,-0.29104 m -0.37042,1.07156 q 0.37042,0 0.635,0.26458 0.26458,0.26459 0.26458,0.635 0,0.37042 -0.26458,0.635 -0.26458,0.26459 -0.635,0.26459 -0.37042,0 -0.635,-0.26459 -0.26458,-0.26458 -0.26458,-0.635 0,-0.37041 0.26458,-0.635 0.26458,-0.26458 0.635,-0.26458 m 6.81302,6.21771 q 0.5424,0 0.91281,0.37041 0.38365,0.38365 0.38365,0.92605 0,0.54239 -0.38365,0.91281 -0.37041,0.38364 -0.91281,0.38364 -0.54239,0 -0.92604,-0.38364 -0.37042,-0.37042 -0.37042,-0.91281 0,-0.5424 0.37042,-0.92605 0.38365,-0.37041 0.92604,-0.37041 m -0.82021,3.81 q 0,0.39687 -0.29104,0.67469 -0.27781,0.29104 -0.67469,0.29104 -0.39687,0 -0.68791,-0.29104 -0.27782,-0.27782 -0.27782,-0.67469 0,-0.39688 0.27782,-0.68792 0.29104,-0.27781 0.68791,-0.27781 0.39688,0 0.67469,0.27781 0.29104,0.29104 0.29104,0.68792 m 0.42334,2.57969 q 0.30427,0.30427 0.30427,0.7276 0,0.42333 -0.30427,0.7276 -0.30427,0.30427 -0.72761,0.30427 -0.42333,0 -0.7276,-0.30427 -0.30427,-0.30427 -0.30427,-0.7276 0,-0.42333 0.30427,-0.7276 0.30427,-0.30428 0.7276,-0.30428 0.42334,0 0.72761,0.30428"
|
||||||
|
id="path2650"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.7 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/frame-3.png-45ecfa8c24c3ae6e5fdde21c0ae9c3c8.stex"
|
path="res://.import/monster_02.svg-5fa8c94a687dc041e8918eed4ba0de85.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-3.png"
|
source_file="res://objects/characters/monsters/02/assets/monster_02.svg"
|
||||||
dest_files=[ "res://.import/frame-3.png-45ecfa8c24c3ae6e5fdde21c0ae9c3c8.stex" ]
|
dest_files=[ "res://.import/monster_02.svg-5fa8c94a687dc041e8918eed4ba0de85.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
20
objects/characters/monsters/02/monster_02.gd
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
extends "res://objects/characters/monsters/static_monster.gd"
|
||||||
|
|
||||||
|
export var sleep_down : float = 5.0
|
||||||
|
export var sleep_up : float = 2.0
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
$Animation.play("move")
|
||||||
|
|
||||||
|
func _on_Animation_finished(anim_name):
|
||||||
|
if anim_name == "move" and health > 0:
|
||||||
|
if $Sprite.position.y >= 0:
|
||||||
|
yield(get_tree().create_timer(sleep_down), "timeout")
|
||||||
|
$Animation.play("move")
|
||||||
|
else:
|
||||||
|
yield(get_tree().create_timer(sleep_up), "timeout")
|
||||||
|
$Animation.play_backwards("move")
|
||||||
|
|
||||||
|
func _on_PlayerCollision(body):
|
||||||
|
if $Sprite.position.y <= 0:
|
||||||
|
body.monster_hit(-body.velocity.x / 10, damage)
|
97
objects/characters/monsters/02/monster_02.tscn
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://objects/characters/monsters/02/assets/monster_02.svg" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://objects/characters/monsters/02/monster_02.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://objects/characters/monsters/02/assets/hole.svg" type="Texture" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 24, 73 )
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=3]
|
||||||
|
resource_name = "die"
|
||||||
|
length = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Sprite:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.5 ),
|
||||||
|
"transitions": PoolRealArray( 0.5, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 40 ), Vector2( 0, 57 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "move"
|
||||||
|
length = 2.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Sprite:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 2 ),
|
||||||
|
"transitions": PoolRealArray( -2, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 40 ), Vector2( 0, -89 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Collision:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 2 ),
|
||||||
|
"transitions": PoolRealArray( -2, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 40 ), Vector2( 0, -89 ) ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("PlayerCollision:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 2 ),
|
||||||
|
"transitions": PoolRealArray( -2, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 40 ), Vector2( 0, -89 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="monster_02" type="StaticBody2D"]
|
||||||
|
collision_layer = 2
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
damage = 15
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, 56.32 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, 40 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Animation" type="AnimationPlayer" parent="."]
|
||||||
|
playback_process_mode = 0
|
||||||
|
anims/die = SubResource( 3 )
|
||||||
|
anims/move = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="PlayerCollision" type="Area2D" parent="."]
|
||||||
|
position = Vector2( 0, 40 )
|
||||||
|
collision_layer = 0
|
||||||
|
|
||||||
|
[node name="Collision" type="CollisionShape2D" parent="PlayerCollision"]
|
||||||
|
scale = Vector2( 1.1, 1.1 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Hole" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, -8 )
|
||||||
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
|
[connection signal="animation_finished" from="Animation" to="." method="_on_Animation_finished"]
|
||||||
|
[connection signal="body_entered" from="PlayerCollision" to="." method="_on_PlayerCollision"]
|
|
@ -2,7 +2,7 @@ extends "res://objects/characters/character.gd"
|
||||||
|
|
||||||
export var speed: int = 50
|
export var speed: int = 50
|
||||||
export var reverse_direction: bool = false
|
export var reverse_direction: bool = false
|
||||||
const DAMAGE = 5
|
export var damage : int = 5
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
if reverse_direction:
|
if reverse_direction:
|
||||||
|
@ -16,12 +16,13 @@ func _process(delta):
|
||||||
$Sprite.flip_h = true
|
$Sprite.flip_h = true
|
||||||
elif velocity.x < 0:
|
elif velocity.x < 0:
|
||||||
$Sprite.flip_h = false
|
$Sprite.flip_h = false
|
||||||
if health <= 0:
|
if health <= 0 and $Collision.disabled == false:
|
||||||
|
velocity = null
|
||||||
|
$Collision.disabled = true
|
||||||
_die()
|
_die()
|
||||||
|
|
||||||
func stomped_on_head():
|
func stomped_on_head():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _die():
|
func _die():
|
||||||
velocity = null
|
pass
|
||||||
$Collision.disabled = true
|
|
||||||
|
|
16
objects/characters/monsters/static_monster.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends StaticBody2D
|
||||||
|
|
||||||
|
export var health : int = 100
|
||||||
|
export var reverse_direction: bool = false
|
||||||
|
export var damage : int = 5
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if health <= 0 and $Collision.disabled == false:
|
||||||
|
$Collision.disabled = true
|
||||||
|
_die()
|
||||||
|
|
||||||
|
func stomped_on_head():
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _die():
|
||||||
|
pass
|
|
@ -78,8 +78,14 @@ func _ready():
|
||||||
$Camera2D.limit_right = level.camera_limit_right
|
$Camera2D.limit_right = level.camera_limit_right
|
||||||
$Camera2D.limit_top = level.camera_limit_top
|
$Camera2D.limit_top = level.camera_limit_top
|
||||||
$Camera2D.limit_bottom = level.camera_limit_bottom
|
$Camera2D.limit_bottom = level.camera_limit_bottom
|
||||||
|
yield(get_tree().create_timer(0.5), "timeout")
|
||||||
|
$Camera2D.smoothing_enabled = true
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
|
# out-of-screen checking
|
||||||
|
if position.y > level.camera_limit_bottom and health > 0:
|
||||||
|
_add_damage(100)
|
||||||
|
|
||||||
# Fall animation if not on floor
|
# Fall animation if not on floor
|
||||||
if velocity.y > 1 and not is_on_floor():
|
if velocity.y > 1 and not is_on_floor():
|
||||||
_set_player_state("fall_start")
|
_set_player_state("fall_start")
|
||||||
|
@ -101,7 +107,10 @@ func _physics_process(delta):
|
||||||
|
|
||||||
# Jump
|
# Jump
|
||||||
if Input.is_action_just_pressed("jump"):
|
if Input.is_action_just_pressed("jump"):
|
||||||
if $RayBottomLeft.is_colliding() or $RayBottomRight.is_colliding():
|
if $RayBottomLeft.is_colliding() or $RayBottomRight.is_colliding() or $RayBottomCenter.is_colliding():
|
||||||
|
print("Left: " + str($RayBottomLeft.is_colliding()))
|
||||||
|
print("Center: " + str($RayBottomCenter.is_colliding()))
|
||||||
|
print("Right: " + str($RayBottomRight.is_colliding()))
|
||||||
jump()
|
jump()
|
||||||
|
|
||||||
func _next_player_state():
|
func _next_player_state():
|
||||||
|
@ -138,9 +147,8 @@ func move_stop():
|
||||||
func jump():
|
func jump():
|
||||||
if _set_player_state("jump_start"):
|
if _set_player_state("jump_start"):
|
||||||
snap = Vector2.ZERO
|
snap = Vector2.ZERO
|
||||||
if get_floor_velocity().y < 0:
|
position.y += get_floor_velocity().y * get_physics_process_delta_time() \
|
||||||
position.y += get_floor_velocity().y * get_physics_process_delta_time() \
|
- GRAVITY * get_physics_process_delta_time() - 3
|
||||||
- GRAVITY * get_physics_process_delta_time() - 3
|
|
||||||
velocity.y -= JUMP_HEIGHT
|
velocity.y -= JUMP_HEIGHT
|
||||||
|
|
||||||
func _on_GroundCheck_body_entered(body):
|
func _on_GroundCheck_body_entered(body):
|
||||||
|
@ -179,4 +187,6 @@ func _add_damage(value):
|
||||||
main.player_died()
|
main.player_died()
|
||||||
|
|
||||||
func _on_screen_exited():
|
func _on_screen_exited():
|
||||||
|
print("exited")
|
||||||
|
print($VisibilityNotifier2D.is_on_screen())
|
||||||
_add_damage(100)
|
_add_damage(100)
|
||||||
|
|
|
@ -21,7 +21,7 @@ script = ExtResource( 11 )
|
||||||
[node name="Sprite" type="AnimatedSprite" parent="."]
|
[node name="Sprite" type="AnimatedSprite" parent="."]
|
||||||
frames = ExtResource( 1 )
|
frames = ExtResource( 1 )
|
||||||
animation = "idle"
|
animation = "idle"
|
||||||
frame = 2
|
frame = 6
|
||||||
playing = true
|
playing = true
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_lock_": true
|
"_edit_lock_": true
|
||||||
|
@ -43,7 +43,6 @@ current = true
|
||||||
limit_left = 0
|
limit_left = 0
|
||||||
limit_bottom = 1080
|
limit_bottom = 1080
|
||||||
limit_smoothed = true
|
limit_smoothed = true
|
||||||
smoothing_enabled = true
|
|
||||||
|
|
||||||
[node name="RayBottomLeft" type="RayCast2D" parent="."]
|
[node name="RayBottomLeft" type="RayCast2D" parent="."]
|
||||||
position = Vector2( -184, 0 )
|
position = Vector2( -184, 0 )
|
||||||
|
@ -59,6 +58,13 @@ cast_to = Vector2( 0, 400 )
|
||||||
collision_mask = 6
|
collision_mask = 6
|
||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
|
|
||||||
|
[node name="RayBottomCenter" type="RayCast2D" parent="."]
|
||||||
|
position = Vector2( -14, 0 )
|
||||||
|
enabled = true
|
||||||
|
cast_to = Vector2( 0, 400 )
|
||||||
|
collision_mask = 6
|
||||||
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="EnemyBottomCheck" type="Area2D" parent="."]
|
[node name="EnemyBottomCheck" type="Area2D" parent="."]
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
|
@ -66,10 +72,5 @@ collision_mask = 2
|
||||||
position = Vector2( -13, 225 )
|
position = Vector2( -13, 225 )
|
||||||
shape = SubResource( 5 )
|
shape = SubResource( 5 )
|
||||||
|
|
||||||
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
|
||||||
position = Vector2( -15, -13.5 )
|
|
||||||
scale = Vector2( 16.9, 23.25 )
|
|
||||||
|
|
||||||
[connection signal="body_entered" from="GroundCheck" to="." method="_on_GroundCheck_body_entered"]
|
[connection signal="body_entered" from="GroundCheck" to="." method="_on_GroundCheck_body_entered"]
|
||||||
[connection signal="body_entered" from="EnemyBottomCheck" to="." method="_on_Enemy_Entered"]
|
[connection signal="body_entered" from="EnemyBottomCheck" to="." method="_on_Enemy_Entered"]
|
||||||
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_screen_exited"]
|
|
||||||
|
|
77
objects/falling_log/assets/log.svg
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="69.999992"
|
||||||
|
height="40.000027"
|
||||||
|
viewBox="0 0 18.520831 10.58334"
|
||||||
|
version="1.1"
|
||||||
|
id="svg3309"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
sodipodi:docname="log.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview3311"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.914906"
|
||||||
|
inkscape:cx="-107.11483"
|
||||||
|
inkscape:cy="110.39385"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1367"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs3306" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Ebene 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-83.859349,-159.83686)">
|
||||||
|
<g
|
||||||
|
id="g4076">
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#bb8044"
|
||||||
|
d="m 102.38018,167.35103 -3.082393,-3.02948 -3.095625,3.02948 -3.069167,-3.02948 -3.095625,3.02948 -3.095625,-3.02948 -3.082396,3.02948 v -1.32292 l 3.082396,-3.02948 3.095625,3.02948 3.095625,-3.02948 3.069167,3.02948 3.095625,-3.02948 3.082393,3.02948 v 1.32292"
|
||||||
|
id="path607"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#80be1f"
|
||||||
|
d="m 102.38018,166.02811 -3.082393,-3.02948 -3.095625,3.02948 -3.069167,-3.02948 -3.095625,3.02948 -3.095625,-3.02948 -3.082396,3.02948 v -3.25437 q 0.06615,-2.40771 2.553229,-2.40771 h 13.414375 q 2.487087,0 2.553227,2.40771 v 3.25437"
|
||||||
|
id="path609"
|
||||||
|
style="fill:#c58f5c;fill-opacity:1;stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#c58f5c"
|
||||||
|
d="m 83.859349,167.35103 3.082396,-3.02948 3.095625,3.02948 3.095625,-3.02948 3.069167,3.02948 3.095625,-3.02948 3.082393,3.02948 v 0.66146 q -0.0132,0.64823 -0.21166,1.13771 l -0.2249,0.4101 -2.645833,-2.60615 -3.095625,3.02948 -3.069167,-3.02948 -3.095625,3.02948 -3.095625,-3.02948 -2.645833,2.60615 -0.211667,-0.4101 q -0.211667,-0.48948 -0.224896,-1.13771 v -0.66146"
|
||||||
|
id="path611"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#93db24"
|
||||||
|
d="m 83.859349,162.77374 v -0.39688 q 0,-2.54 2.553229,-2.54 h 13.414375 q 2.553227,0 2.553227,2.54 v 0.39688 q -0.0661,-2.40771 -2.553227,-2.40771 H 86.412578 q -2.487083,0 -2.553229,2.40771"
|
||||||
|
id="path613"
|
||||||
|
style="fill:#c99869;fill-opacity:1;stroke-width:0.264583" />
|
||||||
|
<path
|
||||||
|
stroke="none"
|
||||||
|
fill="#c99869"
|
||||||
|
d="m 84.295912,169.5603 2.645833,-2.60615 3.095625,3.02948 3.095625,-3.02948 3.069167,3.02948 3.095625,-3.02948 2.645833,2.60615 -0.0132,0.0132 -0.0529,0.0794 -0.27781,0.26459 q -0.635,0.50271 -1.772707,0.50271 H 86.412578 q -1.137708,0 -1.772708,-0.50271 l -0.264583,-0.26459 -0.05292,-0.0661 -0.02646,-0.0265"
|
||||||
|
id="path615"
|
||||||
|
style="stroke-width:0.264583" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/frame-1.png-35614784daba5888c4fa0619c9be7727.stex"
|
path="res://.import/log.svg-8e83d1dcda57ee6a72d547fca1627586.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/characters/monsters/01/01/idle/frame-1.png"
|
source_file="res://objects/falling_log/assets/log.svg"
|
||||||
dest_files=[ "res://.import/frame-1.png-35614784daba5888c4fa0619c9be7727.stex" ]
|
dest_files=[ "res://.import/log.svg-8e83d1dcda57ee6a72d547fca1627586.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
18
objects/falling_log/falling_log.gd
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
extends StaticBody2D
|
||||||
|
|
||||||
|
export var recover_time : float = 2.0
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
$Animation.play("recover")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_PlayerCollision(body):
|
||||||
|
$PlayerCollision/Collision.disabled = true
|
||||||
|
$Animation.play("player_on_log")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Animation_finished(anim_name):
|
||||||
|
if anim_name == "player_on_log":
|
||||||
|
yield(get_tree().create_timer(recover_time), "timeout")
|
||||||
|
$PlayerCollision/Collision.disabled = false
|
||||||
|
$Animation.play("recover")
|
114
objects/falling_log/falling_log.tscn
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://objects/falling_log/assets/log.svg" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://objects/falling_log/falling_log.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 34.5, 20 )
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "player_on_log"
|
||||||
|
length = 3.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Sprite:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.2, 0.5, 3 ),
|
||||||
|
"transitions": PoolRealArray( -2, 0.5, 6, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 20 ), Vector2( 0, 40 ), Vector2( 0, 25 ), Vector2( 0, 1000 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Sprite:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.5, 2.5 ),
|
||||||
|
"transitions": PoolRealArray( 1, 6, 2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("Collision:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.2, 0.5, 3 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2, 6, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 20 ), Vector2( 0, 40 ), Vector2( 0, 25 ), Vector2( 0, 1000 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=3]
|
||||||
|
resource_name = "recover"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Sprite:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1 ),
|
||||||
|
"transitions": PoolRealArray( -2, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 50 ), Vector2( 0, 20 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Collision:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0.001, 1 ),
|
||||||
|
"transitions": PoolRealArray( -2, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 50 ), Vector2( 0, 20 ) ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("Sprite:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="FallingLog" type="StaticBody2D"]
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 0
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, 20 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, 20 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="PlayerCollision" type="Area2D" parent="."]
|
||||||
|
collision_layer = 0
|
||||||
|
|
||||||
|
[node name="Collision" type="CollisionShape2D" parent="PlayerCollision"]
|
||||||
|
position = Vector2( 0, 20 )
|
||||||
|
scale = Vector2( 1.2, 1.2 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Animation" type="AnimationPlayer" parent="."]
|
||||||
|
anims/player_on_log = SubResource( 2 )
|
||||||
|
anims/recover = SubResource( 3 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="PlayerCollision" to="." method="_on_PlayerCollision"]
|
||||||
|
[connection signal="animation_finished" from="Animation" to="." method="_on_Animation_finished"]
|
17
scenes/levels/02/CollidingMountain.tscn
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://scenes/levels/01/assets/mountain_01.svg" type="Texture" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=3]
|
||||||
|
extents = Vector2( 105, 319 )
|
||||||
|
|
||||||
|
[node name="CollidingMountain" type="StaticBody2D"]
|
||||||
|
z_index = -5
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 0
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource( 3 )
|
|
@ -23,21 +23,49 @@ region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
[node name="Sprite2" type="Sprite" parent="Stars"]
|
[node name="Sprite2" type="Sprite" parent="Stars"]
|
||||||
position = Vector2( 250, 250 )
|
position = Vector2( 250, 250 )
|
||||||
texture = ExtResource( 7 )
|
texture = ExtResource( 7 )
|
||||||
offset = Vector2( 500, 0 )
|
offset = Vector2( 1000, 0 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 0, 0, 500, 500 )
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
[node name="Sprite3" type="Sprite" parent="Stars"]
|
[node name="Sprite3" type="Sprite" parent="Stars"]
|
||||||
position = Vector2( 250, 250 )
|
position = Vector2( 250, 250 )
|
||||||
texture = ExtResource( 7 )
|
texture = ExtResource( 7 )
|
||||||
offset = Vector2( 1000, 0 )
|
offset = Vector2( 2000, 0 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 0, 0, 500, 500 )
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
[node name="Sprite4" type="Sprite" parent="Stars"]
|
[node name="Sprite4" type="Sprite" parent="Stars"]
|
||||||
position = Vector2( 250, 250 )
|
position = Vector2( 250, 250 )
|
||||||
texture = ExtResource( 7 )
|
texture = ExtResource( 7 )
|
||||||
offset = Vector2( 1500, 0 )
|
offset = Vector2( 3000, 0 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
|
[node name="Sprite5" type="Sprite" parent="Stars"]
|
||||||
|
position = Vector2( 250, 250 )
|
||||||
|
texture = ExtResource( 7 )
|
||||||
|
offset = Vector2( 0, 1000 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
|
[node name="Sprite6" type="Sprite" parent="Stars"]
|
||||||
|
position = Vector2( 250, 250 )
|
||||||
|
texture = ExtResource( 7 )
|
||||||
|
offset = Vector2( 1000, 1000 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
|
[node name="Sprite7" type="Sprite" parent="Stars"]
|
||||||
|
position = Vector2( 250, 250 )
|
||||||
|
texture = ExtResource( 7 )
|
||||||
|
offset = Vector2( 2000, 1000 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
|
[node name="Sprite8" type="Sprite" parent="Stars"]
|
||||||
|
position = Vector2( 250, 250 )
|
||||||
|
texture = ExtResource( 7 )
|
||||||
|
offset = Vector2( 3000, 1000 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 0, 0, 500, 500 )
|
region_rect = Rect2( 0, 0, 500, 500 )
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,58 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://scenes/levels/02/level_02.gd" type="Script" id=1]
|
[ext_resource path="res://scenes/levels/02/level_02.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://common/tiles/grasland.tres" type="TileSet" id=2]
|
[ext_resource path="res://common/tiles/grasland.tres" type="TileSet" id=2]
|
||||||
[ext_resource path="res://objects/characters/player.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://objects/characters/player.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://scenes/levels/02/background_02.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://scenes/levels/02/background_02.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://scenes/levels/02/CollidingMountain.tscn" type="PackedScene" id=5]
|
||||||
|
[ext_resource path="res://objects/characters/monsters/02/monster_02.tscn" type="PackedScene" id=6]
|
||||||
|
[ext_resource path="res://objects/characters/monsters/01/monster_01.tscn" type="PackedScene" id=7]
|
||||||
|
[ext_resource path="res://objects/falling_log/falling_log.tscn" type="PackedScene" id=8]
|
||||||
|
|
||||||
[node name="Level 02" type="Node2D"]
|
[node name="Level 02" type="Node2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
bgm_path = "res://scenes/levels/02/assets/bgm.ogg"
|
bgm_path = "res://scenes/levels/02/assets/bgm.ogg"
|
||||||
hud_color = Color( 1, 1, 1, 1 )
|
hud_color = Color( 1, 1, 1, 1 )
|
||||||
clear_color = Color( 0.0431373, 0.298039, 0.403922, 1 )
|
clear_color = Color( 0, 0, 0, 1 )
|
||||||
|
camera_limit_bottom = 1190
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 3 )]
|
[node name="Player" parent="." instance=ExtResource( 3 )]
|
||||||
position = Vector2( 136, 808 )
|
position = Vector2( 350, 980 )
|
||||||
scale = Vector2( 0.2, 0.2 )
|
scale = Vector2( 0.2, 0.2 )
|
||||||
background_scene = ExtResource( 4 )
|
background_scene = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="monster_02" parent="." instance=ExtResource( 6 )]
|
||||||
|
position = Vector2( 980, 1050 )
|
||||||
|
sleep_down = 3.0
|
||||||
|
sleep_up = 1.0
|
||||||
|
|
||||||
[node name="Tiles" type="TileMap" parent="."]
|
[node name="Tiles" type="TileMap" parent="."]
|
||||||
tile_set = ExtResource( 2 )
|
tile_set = ExtResource( 2 )
|
||||||
|
cell_size = Vector2( 70, 70 )
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
format = 1
|
format = 1
|
||||||
tile_data = PoolIntArray( 917505, 0, 1, 917506, 0, 2, 917507, 0, 2, 917508, 0, 2, 917509, 0, 2, 917510, 0, 2, 917511, 0, 2, 917512, 0, 2, 917513, 0, 2, 917514, 0, 2, 917515, 0, 2, 917516, 0, 2, 917517, 0, 2, 917518, 0, 2, 917519, 0, 2, 917520, 0, 2, 917521, 0, 2, 917522, 0, 2, 917523, 0, 2, 917524, 0, 2, 917525, 0, 2, 917526, 0, 2, 917527, 0, 2, 917528, 0, 2, 917529, 0, 2, 917530, 0, 2, 917531, 0, 2, 917532, 0, 2, 917533, 0, 2, 917534, 0, 2, 917535, 0, 2, 917536, 0, 2, 917537, 0, 2, 917538, 0, 2, 917539, 0, 2, 917540, 0, 2, 917541, 0, 2, 917542, 0, 2, 917543, 0, 2, 917544, 0, 0, 983080, 0, 0, 983081, 0, 2, 983082, 0, 2, 983083, 0, 2, 983084, 0, 3 )
|
tile_data = PoolIntArray( 983033, 4, 0, 983034, 4, 0, 983035, 4, 0, 983036, 4, 0, 983037, 4, 0, 983038, 4, 0, 983039, 4, 0, 917504, 4, 0, 917505, 7, 0, 1048569, 5, 0, 1048570, 5, 0, 1048571, 5, 0, 1048572, 5, 0, 1048573, 5, 0, 1048574, 5, 0, 1048575, 5, 0, 983040, 5, 0, 983041, 8, 0, 983042, 4, 0, 983043, 4, 0, 983044, 4, 0, 983045, 4, 0, 983046, 4, 0, 983047, 4, 0, 983048, 4, 0, 983049, 4, 0, 983050, 4, 0, 983051, 4, 0, 983052, 4, 0, 983053, 4, 0, 983054, 15, 0, 983055, 11, 0, 983056, 11, 0, 983057, 11, 0, 983058, 11, 0, 983059, 11, 0, 983060, 11, 0, 983061, 11, 0, 983062, 11, 0, 983063, 11, 0, 983064, 11, 0, 983065, 11, 0, 983066, 11, 0, 983067, 11, 0, 983068, 11, 0, 983069, 11, 0, 983070, 14, 0, 983071, 4, 0, 983072, 4, 0, 983073, 4, 0, 983074, 4, 0, 983075, 4, 0, 983076, 4, 0, 983077, 4, 0, 983078, 4, 0, 983079, 4, 0, 1114105, 5, 0, 1114106, 5, 0, 1114107, 5, 0, 1114108, 5, 0, 1114109, 5, 0, 1114110, 5, 0, 1114111, 5, 0, 1048576, 5, 0, 1048577, 5, 0, 1048578, 5, 0, 1048579, 5, 0, 1048580, 5, 0, 1048581, 5, 0, 1048582, 5, 0, 1048583, 5, 0, 1048584, 5, 0, 1048585, 5, 0, 1048586, 5, 0, 1048587, 5, 0, 1048588, 5, 0, 1048589, 5, 0, 1048590, 5, 0, 1048591, 12, 0, 1048592, 12, 0, 1048593, 12, 0, 1048594, 12, 0, 1048595, 12, 0, 1048596, 12, 0, 1048597, 12, 0, 1048598, 12, 0, 1048599, 12, 0, 1048600, 12, 0, 1048601, 12, 0, 1048602, 12, 0, 1048603, 12, 0, 1048604, 12, 0, 1048605, 12, 0, 1048606, 5, 0, 1048607, 5, 0, 1048608, 5, 0, 1048609, 5, 0, 1048610, 5, 0, 1048611, 5, 0, 1048612, 5, 0, 1048613, 5, 0, 1048614, 5, 0, 1048615, 5, 0, 1179641, 5, 0, 1179642, 5, 0, 1179643, 5, 0, 1179644, 5, 0, 1179645, 5, 0, 1179646, 5, 0, 1179647, 5, 0, 1114112, 5, 0, 1114113, 5, 0, 1114114, 5, 0, 1114115, 5, 0, 1114116, 5, 0, 1114117, 5, 0, 1114118, 5, 0, 1114119, 5, 0, 1114120, 5, 0, 1114121, 5, 0, 1114122, 5, 0, 1114123, 5, 0, 1114124, 5, 0, 1114125, 5, 0, 1114126, 5, 0, 1114127, 12, 0, 1114128, 12, 0, 1114129, 12, 0, 1114130, 12, 0, 1114131, 12, 0, 1114132, 12, 0, 1114133, 12, 0, 1114134, 12, 0, 1114135, 12, 0, 1114136, 12, 0, 1114137, 12, 0, 1114138, 12, 0, 1114139, 12, 0, 1114140, 12, 0, 1114141, 12, 0, 1114142, 5, 0, 1114143, 5, 0, 1114144, 5, 0, 1114145, 5, 0, 1114146, 5, 0, 1114147, 5, 0, 1114148, 5, 0, 1114149, 5, 0, 1114150, 5, 0, 1114151, 5, 0, 1245177, 5, 0, 1245178, 5, 0, 1245179, 5, 0, 1245180, 5, 0, 1245181, 5, 0, 1245182, 5, 0, 1245183, 5, 0, 1179648, 5, 0, 1179649, 5, 0, 1179650, 5, 0, 1179651, 5, 0, 1179652, 5, 0, 1179653, 5, 0, 1179654, 5, 0, 1179655, 5, 0, 1179656, 5, 0, 1179657, 5, 0, 1179658, 5, 0, 1179659, 5, 0, 1179660, 5, 0, 1179661, 5, 0, 1179662, 5, 0, 1179663, 12, 0, 1179664, 12, 0, 1179665, 12, 0, 1179666, 12, 0, 1179667, 12, 0, 1179668, 12, 0, 1179669, 12, 0, 1179670, 12, 0, 1179671, 12, 0, 1179672, 12, 0, 1179673, 12, 0, 1179674, 12, 0, 1179675, 12, 0, 1179676, 12, 0, 1179677, 12, 0, 1179678, 5, 0, 1179679, 5, 0, 1179680, 5, 0, 1179681, 5, 0, 1179682, 5, 0, 1179683, 5, 0, 1179684, 5, 0, 1179685, 5, 0, 1179686, 5, 0, 1179687, 5, 0 )
|
||||||
|
|
||||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||||
color = Color( 0.501961, 0.501961, 0.501961, 1 )
|
color = Color( 0.501961, 0.501961, 0.501961, 1 )
|
||||||
|
|
||||||
|
[node name="CollidingMountain2" parent="." instance=ExtResource( 5 )]
|
||||||
|
modulate = Color( 0.59, 0.59, 0.59, 1 )
|
||||||
|
position = Vector2( 35, 665 )
|
||||||
|
|
||||||
|
[node name="CollidingMountain" parent="." instance=ExtResource( 5 )]
|
||||||
|
modulate = Color( 0.59, 0.59, 0.59, 1 )
|
||||||
|
position = Vector2( 175, 770 )
|
||||||
|
|
||||||
|
[node name="monster_01" parent="." instance=ExtResource( 7 )]
|
||||||
|
position = Vector2( 2205, 1015 )
|
||||||
|
|
||||||
|
[node name="FallingLog" parent="." instance=ExtResource( 8 )]
|
||||||
|
position = Vector2( 1260, 1050 )
|
||||||
|
|
||||||
|
[node name="FallingLog2" parent="." instance=ExtResource( 8 )]
|
||||||
|
position = Vector2( 1575, 1050 )
|
||||||
|
|
||||||
|
[node name="FallingLog3" parent="." instance=ExtResource( 8 )]
|
||||||
|
position = Vector2( 1890, 1050 )
|
||||||
|
|
|
@ -20,7 +20,7 @@ tracks/0/keys = {
|
||||||
|
|
||||||
[node name="Main" type="Node2D"]
|
[node name="Main" type="Node2D"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
level_path = "res://scenes/levels/00/interlude_00.tscn"
|
level_path = "res://scenes/levels/02/level_02.tscn"
|
||||||
|
|
||||||
[node name="HUD" parent="." instance=ExtResource( 1 )]
|
[node name="HUD" parent="." instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
|