This commit is contained in:
noyciy7037 2024-01-03 13:40:31 +09:00
parent ce3de675b8
commit a49238f440
Signed by: noyciy7037
GPG Key ID: 46A54FA18BBA58FF
27 changed files with 729 additions and 15 deletions

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="9.0969515mm"
height="9.0969515mm"
viewBox="0 0 9.0969514 9.0969515"
version="1.1"
id="svg1"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<linearGradient
id="linearGradient3">
<stop
style="stop-color:#fd00ff;stop-opacity:1;"
offset="0.54864591"
id="stop5" />
<stop
style="stop-color:#12ff00;stop-opacity:1;"
offset="1"
id="stop3" />
<stop
style="stop-color:#ff0000;stop-opacity:0;"
offset="1"
id="stop4" />
</linearGradient>
<radialGradient
xlink:href="#linearGradient3"
id="radialGradient4"
cx="11.742052"
cy="13.866092"
fx="11.742052"
fy="13.866092"
r="3.3482676"
gradientUnits="userSpaceOnUse" />
</defs>
<g
id="layer1"
transform="translate(-7.1935761,-9.3176157)">
<circle
style="fill:#00ff78;fill-opacity:1;stroke:url(#radialGradient4);stroke-width:2.665;stroke-dasharray:none;stroke-opacity:1"
id="path1"
cx="11.742052"
cy="13.866092"
r="3.215976" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djrsq3b36qbwp"
path="res://.godot/imported/shot.svg-9a0b4bb3b50c9c15ca31472858929761.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/bullet/shot.svg"
dest_files=["res://.godot/imported/shot.svg-9a0b4bb3b50c9c15ca31472858929761.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40.542934mm"
height="35.605442mm"
viewBox="0 0 40.542934 35.605442"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-36.71862,-26.682455)"><circle
style="display:inline;fill:none;stroke:#000000;stroke-width:0.0741673"
id="circle1"
cx="57.049919"
cy="44.485176"
r="10.525951" /></g></svg>

After

Width:  |  Height:  |  Size: 614 B

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgbjvearadscl"
path="res://.godot/imported/death0.svg-d517042a7cb46a6fbd47c0e0f00fe2df.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/effect/death0.svg"
dest_files=["res://.godot/imported/death0.svg-d517042a7cb46a6fbd47c0e0f00fe2df.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="35.605442mm"
height="35.605442mm"
viewBox="0 0 35.605442 35.605442"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-39.247198,-26.682455)"><circle
style="display:inline;fill:none;stroke:#000000;stroke-width:0.125"
id="path1"
cx="57.049919"
cy="44.485176"
r="17.740221" /><circle
style="display:inline;fill:none;stroke:#000000;stroke-width:0.0741673"
id="circle1"
cx="57.049919"
cy="44.485176"
r="10.525951" /></g></svg>

After

Width:  |  Height:  |  Size: 782 B

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cbwskucribly0"
path="res://.godot/imported/death1.svg-f1f1d0f410c641c72ace9e657f43f4d7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/effect/death1.svg"
dest_files=["res://.godot/imported/death1.svg-f1f1d0f410c641c72ace9e657f43f4d7.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="35.605442mm"
height="35.605442mm"
viewBox="0 0 35.605442 35.605442"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-39.247198,-26.682455)"><circle
style="display:inline;fill:none;stroke:#000000;stroke-width:0.125"
id="path1"
cx="57.049919"
cy="44.485176"
r="17.740221" /></g></svg>

After

Width:  |  Height:  |  Size: 609 B

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blbv74h0mwgwe"
path="res://.godot/imported/death2.svg-5b5210ee2b761d1def9ddfafbaf063d4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/effect/death2.svg"
dest_files=["res://.godot/imported/death2.svg-5b5210ee2b761d1def9ddfafbaf063d4.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40.542934mm"
height="21.027836mm"
viewBox="0 0 40.542934 21.027836"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-27.618457,-17.769731)"><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="M 40.734163,34.806839 40.649553,23.637607 C 39.273918,2.62544 15.484043,47.431904 36.164937,37.091453 Z"
id="path2" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 55.045684,34.75214 0.08461,-11.169232 c 1.375635,-21.0121674 25.16551,23.794297 4.484616,13.453846 z"
id="path3" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 40.869229,24.030769 c 3.875273,-6.579688 9.696588,-7.091952 14.300001,-0.592308 l -0.169235,11.423077 c -4.279637,3.954607 -9.259335,3.99309 -14.215383,-0.169232 z"
id="path4" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="path5"
cx="45.068539"
cy="25.742765"
r="1.3910966" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="circle6"
cx="50.064522"
cy="25.712849"
r="1.3910966" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 46.190389,28.121094 c 0,0 -1.503473,3.440616 0.358992,3.081353 2.354428,-0.454161 -0.205258,-2.164321 -0.643194,-1.421013"
id="path6" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 50.381582,28.121094 c 0,0 1.503473,3.440616 -0.358992,3.081353 -2.354428,-0.454161 0.205258,-2.164321 0.643194,-1.421013"
id="path7" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 47.035577,32.799038 0.222115,1.279808 -4.823077,-1.935578"
id="path8" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 49.3625,32.492307 -0.01058,2.125961 3.617309,-2.221153"
id="path9" /></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2er7ud1ssj70"
path="res://.godot/imported/mob_A0.svg-02276270234100b033e0f858c8e66e8f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/mob/mob_A0.svg"
dest_files=["res://.godot/imported/mob_A0.svg-02276270234100b033e0f858c8e66e8f.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40.542934mm"
height="21.027836mm"
viewBox="0 0 40.542934 21.027836"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-27.619,-17.77)"><path
style="fill:none;stroke:#000000;stroke-width:0.203627;stroke-opacity:1"
d="m 55.015002,35.216607 0.05647,-9.912778 c 0.293712,-5.966012 2.118451,-5.953371 4.012616,-3.477337 4.026583,5.26351 8.3669,21.658978 -1.01965,15.417727 z"
id="path3" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 40.869229,24.030769 c 3.875273,-6.579688 9.696588,-7.091952 14.300001,-0.592308 l -0.169235,11.423077 c -4.279637,3.954607 -9.259335,3.99309 -14.215383,-0.169232 z"
id="path4" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="path5"
cx="45.068539"
cy="25.742765"
r="1.3910966" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="circle6"
cx="50.064522"
cy="25.712849"
r="1.3910966" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 46.190389,28.121094 c 0,0 -1.503473,3.440616 0.358992,3.081353 2.354428,-0.454161 -0.205258,-2.164321 -0.643194,-1.421013"
id="path6" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 50.381582,28.121094 c 0,0 1.503473,3.440616 -0.358992,3.081353 -2.354428,-0.454161 0.205258,-2.164321 0.643194,-1.421013"
id="path7" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 47.035577,32.799038 0.222115,1.279808 -4.823077,-1.935578"
id="path8" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 49.3625,32.492307 -0.01058,2.125961 3.617309,-2.221153"
id="path9" /><path
style="fill:none;stroke:#000000;stroke-width:0.203627;stroke-opacity:1"
d="m 40.790901,35.216607 -0.05647,-9.912778 c -0.293712,-5.966012 -2.118451,-5.953371 -4.012616,-3.477337 -4.026583,5.26351 -8.3669,21.658978 1.01965,15.417727 z"
id="path10" /></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://txkug16xogsh"
path="res://.godot/imported/mob_A1.svg-213c5bea531e8e7f89cbc4686e5908f9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/mob/mob_A1.svg"
dest_files=["res://.godot/imported/mob_A1.svg-213c5bea531e8e7f89cbc4686e5908f9.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="31.757074mm"
height="20.053011mm"
viewBox="0 0 31.757074 20.053011"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"
transform="translate(-32.024415,-18.688844)"><path
style="fill:none;stroke:#000000;stroke-width:0.203627;stroke-opacity:1"
d="m 55.015002,35.216607 0.05647,-9.912778 c 0.293712,-5.966012 2.118451,-5.953371 4.012616,-3.477337 4.026583,5.26351 8.3669,21.658978 -1.01965,15.417727 z"
id="path3" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 40.869229,24.030769 c 3.875273,-6.579688 9.696588,-7.091952 14.300001,-0.592308 l -0.169235,11.423077 c -4.279637,3.954607 -9.259335,3.99309 -14.215383,-0.169232 z"
id="path4" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="path5"
cx="45.068539"
cy="25.742765"
r="1.3910966" /><circle
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
id="circle6"
cx="50.064522"
cy="25.712849"
r="1.3910966" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 46.190389,28.121094 c 0,0 -1.503473,3.440616 0.358992,3.081353 2.354428,-0.454161 -0.205258,-2.164321 -0.643194,-1.421013"
id="path6" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 50.381582,28.121094 c 0,0 1.503473,3.440616 -0.358992,3.081353 -2.354428,-0.454161 0.205258,-2.164321 0.643194,-1.421013"
id="path7" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 47.035577,32.799038 0.222115,1.279808 -4.823077,-1.935578"
id="path8" /><path
style="fill:none;stroke:#000000;stroke-width:0.264583;stroke-opacity:1"
d="m 49.3625,32.492307 -0.01058,2.125961 3.617309,-2.221153"
id="path9" /><path
style="fill:none;stroke:#000000;stroke-width:0.203627;stroke-opacity:1"
d="m 40.790901,35.216607 -0.05647,-9.912778 c -0.293712,-5.966012 -2.118451,-5.953371 -4.012616,-3.477337 -4.026583,5.26351 -8.3669,21.658978 1.01965,15.417727 z"
id="path10" /></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dalgye6fkcmda"
path="res://.godot/imported/mob_A1.svg-a6ab08843b45cf5f34a7ee9afbbd2420.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/player/mob_A1.svg"
dest_files=["res://.godot/imported/mob_A1.svg-a6ab08843b45cf5f34a7ee9afbbd2420.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,16 +1,20 @@
extends Area2D
@export var speed = 400
var screen_size
@export var shot_scene: PackedScene
var finalShot = 0.0
signal shot_signal
# Called when the node enters the scene tree for the first time.
func _ready():
screen_size = get_viewport_rect().size
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
var velocity = Vector2.ZERO # The player's movement vector.
var rate = 1
if Input.is_action_pressed("move_right"):
velocity.x += 1
if Input.is_action_pressed("move_left"):
@ -19,9 +23,20 @@ func _process(delta):
velocity.y += 1
if Input.is_action_pressed("move_up"):
velocity.y -= 1
if Input.is_action_pressed("slow"):
rate = 0.5
if Input.is_action_pressed(("shot")) and finalShot > 0.1:
var shot = shot_scene.instantiate()
shot.linear_velocity = Vector2(0,-800)
shot.position = position
# ステージに生成を指示
shot_signal.emit(shot)
finalShot = 0
finalShot += delta
if velocity.length() > 0:
velocity = velocity.normalized() * speed
velocity = velocity.normalized() * speed * rate
$AnimatedSprite2D.play()
else:
$AnimatedSprite2D.stop()

11
entity/bullet/shot.gd Normal file
View File

@ -0,0 +1,11 @@
extends RigidBody2D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

22
entity/bullet/shot.tscn Normal file
View File

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://b2biksphf4kpn"]
[ext_resource type="Script" path="res://entity/bullet/shot.gd" id="1_2tnht"]
[ext_resource type="Texture2D" uid="uid://djrsq3b36qbwp" path="res://assets/images/bullet/shot.svg" id="1_gt67b"]
[sub_resource type="CircleShape2D" id="CircleShape2D_du5u8"]
radius = 13.0384
[node name="Shot" type="RigidBody2D"]
collision_layer = 2
collision_mask = 4
gravity_scale = 0.0
linear_damp_mode = 1
angular_damp_mode = 1
script = ExtResource("1_2tnht")
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_gt67b")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_du5u8")

21
entity/mob/mob_enemy.gd Normal file
View File

@ -0,0 +1,21 @@
extends Area2D
# Called when the node enters the scene tree for the first time.
func _ready():
var mob_types = $AnimatedSprite2D.sprite_frames.get_animation_names()
#$AnimatedSprite2D.play(mob_types[randi() % mob_types.size()])
$AnimatedSprite2D.play("mobA")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_body_entered(body):
$CollisionShape2D.set_deferred("disabled", true)
var playerSprite = $AnimatedSprite2D
playerSprite.play("death")
await playerSprite.animation_finished
queue_free()

57
entity/mob/mob_enemy.tscn Normal file
View File

@ -0,0 +1,57 @@
[gd_scene load_steps=9 format=3 uid="uid://bp6kld25usim4"]
[ext_resource type="Texture2D" uid="uid://2er7ud1ssj70" path="res://assets/images/mob/mob_A0.svg" id="1_m208q"]
[ext_resource type="Script" path="res://entity/mob/mob_enemy.gd" id="1_nmxwn"]
[ext_resource type="Texture2D" uid="uid://txkug16xogsh" path="res://assets/images/mob/mob_A1.svg" id="2_ho6m5"]
[ext_resource type="Texture2D" uid="uid://bgbjvearadscl" path="res://assets/images/effect/death0.svg" id="2_v08g0"]
[ext_resource type="Texture2D" uid="uid://cbwskucribly0" path="res://assets/images/effect/death1.svg" id="3_qfb3p"]
[ext_resource type="Texture2D" uid="uid://blbv74h0mwgwe" path="res://assets/images/effect/death2.svg" id="4_dqgde"]
[sub_resource type="SpriteFrames" id="SpriteFrames_620mj"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_v08g0")
}, {
"duration": 1.0,
"texture": ExtResource("3_qfb3p")
}, {
"duration": 1.0,
"texture": ExtResource("4_dqgde")
}],
"loop": false,
"name": &"death",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_m208q")
}, {
"duration": 1.0,
"texture": ExtResource("2_ho6m5")
}],
"loop": true,
"name": &"mobA",
"speed": 8.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dopta"]
radius = 22.0
height = 80.0
[node name="MobEnemy" type="Area2D"]
collision_layer = 4
collision_mask = 2
script = ExtResource("1_nmxwn")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_620mj")
animation = &"death"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource("CapsuleShape2D_dopta")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=10 format=3 uid="uid://djokiepdvy3r4"]
[gd_scene load_steps=11 format=3 uid="uid://djokiepdvy3r4"]
[ext_resource type="Script" path="res://entity/Player.gd" id="1_wbhmb"]
[ext_resource type="Texture2D" uid="uid://bk7g7e8esssyj" path="res://assets/images/player/up0.png" id="2_lkbqe"]
[ext_resource type="PackedScene" uid="uid://b2biksphf4kpn" path="res://entity/bullet/shot.tscn" id="2_wtk07"]
[ext_resource type="Texture2D" uid="uid://dqhbikc2p5eqy" path="res://assets/images/player/up1.png" id="3_81m7d"]
[ext_resource type="Texture2D" uid="uid://d3kwb3cf58ano" path="res://assets/images/player/up2.png" id="4_oshyc"]
[ext_resource type="Texture2D" uid="uid://cnhmnm7ow2ctf" path="res://assets/images/player/walk0.png" id="5_yac28"]
@ -48,7 +49,9 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_cvy7c"]
[node name="Player" type="Area2D"]
collision_mask = 12
script = ExtResource("1_wbhmb")
shot_scene = ExtResource("2_wtk07")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]

View File

@ -52,6 +52,23 @@ move_right={
"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,"echo":false,"script":null)
]
}
slow={
"deadzone": 0.5,
"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":4194325,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
shot={
"deadzone": 0.5,
"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":90,"key_label":0,"unicode":122,"echo":false,"script":null)
]
}
[layer_names]
2d_physics/layer_1="player"
2d_physics/layer_2="shot"
2d_physics/layer_3="enemy"
2d_physics/layer_4="bullet"
[rendering]

View File

@ -1,11 +1,20 @@
extends Node
var time = 0
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
$Player.position = $StartPos.position
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
time += delta
func _on_player_shot_signal(shot):
add_child(shot)
func _on_game_body_exited(body):
body.queue_free()

View File

@ -1,12 +1,38 @@
[gd_scene load_steps=4 format=3 uid="uid://t4bkano14bq8"]
[gd_scene load_steps=5 format=3 uid="uid://t4bkano14bq8"]
[ext_resource type="PackedScene" uid="uid://djokiepdvy3r4" path="res://entity/player.tscn" id="1_iklq5"]
[ext_resource type="Script" path="res://scene/stage_1.gd" id="1_xsra1"]
[ext_resource type="PackedScene" uid="uid://c1u2s2e48w4pd" path="res://ui/game_ui.tscn" id="2_j74kp"]
[ext_resource type="PackedScene" uid="uid://bp6kld25usim4" path="res://entity/mob/mob_enemy.tscn" id="4_druno"]
[node name="Stage1" type="Node"]
script = ExtResource("1_xsra1")
[node name="Player" parent="." instance=ExtResource("1_iklq5")]
position = Vector2(480, 1000)
[node name="GameUI" parent="." instance=ExtResource("2_j74kp")]
[node name="Game" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 14
metadata/_edit_group_ = true
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Game"]
visible = false
polygon = PackedVector2Array(0, 0, 960, 0, 960, 1080, 0, 1080)
[node name="MobEnemy" parent="." instance=ExtResource("4_druno")]
position = Vector2(477, 83)
[node name="MobEnemy2" parent="." instance=ExtResource("4_druno")]
position = Vector2(138, 203)
[node name="MobEnemy3" parent="." instance=ExtResource("4_druno")]
position = Vector2(783, 206)
[node name="StartPos" type="Marker2D" parent="."]
position = Vector2(480, 1000)
[connection signal="shot_signal" from="Player" to="." method="_on_player_shot_signal"]
[connection signal="body_exited" from="Game" to="." method="_on_game_body_exited"]

View File

@ -1,5 +1,6 @@
extends CanvasLayer
@export var stage1_scene: PackedScene
# Called when the node enters the scene tree for the first time.
func _ready():
@ -14,9 +15,13 @@ func _process(delta):
quitBtn.grab_focus()
func enableExtra():
$MarginContainer/VBoxContainer/Extra.disabled = false
$MarginContainer/VBoxContainer/Extra.focus_mode = 2
var extraBtn = $MarginContainer/VBoxContainer/Extra
extraBtn.disabled = false
extraBtn.focus_mode = 2
func _on_start_pressed():
get_tree().change_scene_to_packed(stage1_scene)
func _on_quit_pressed():
get_tree().quit()

View File

@ -1,12 +1,14 @@
[gd_scene load_steps=4 format=3 uid="uid://bqyi0a4fcs563"]
[gd_scene load_steps=5 format=3 uid="uid://bqyi0a4fcs563"]
[ext_resource type="Script" path="res://scene/title.gd" id="1_5j3g0"]
[ext_resource type="FontFile" uid="uid://q5lv1cuadoq5" path="res://fonts/DotGothic16/DotGothic16-Regular.ttf" id="2_bf5un"]
[ext_resource type="PackedScene" uid="uid://t4bkano14bq8" path="res://scene/stage_1.tscn" id="2_clc4v"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tokxl"]
[node name="Title" type="CanvasLayer"]
script = ExtResource("1_5j3g0")
stage1_scene = ExtResource("2_clc4v")
[node name="MarginContainer" type="MarginContainer" parent="."]
anchors_preset = 3
@ -163,4 +165,5 @@ text = "Quit"
flat = true
alignment = 0
[connection signal="pressed" from="MarginContainer/VBoxContainer/Start" to="." method="_on_start_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"]

View File

@ -8,8 +8,5 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
$Panel/Label.set_text("FPS: " + "%s" % Engine.get_frames_per_second())
func _on_viewport_size_changed():
# Do whatever you need to do when the window changes!
print ("Viewport size changed")

View File

@ -1,10 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://c1u2s2e48w4pd"]
[gd_scene load_steps=6 format=3 uid="uid://c1u2s2e48w4pd"]
[ext_resource type="Script" path="res://ui/game_ui.gd" id="1_ritbu"]
[ext_resource type="FontFile" uid="uid://q5lv1cuadoq5" path="res://fonts/DotGothic16/DotGothic16-Regular.ttf" id="2_u12eu"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vehpn"]
bg_color = Color(0, 0.65098, 0.882353, 1)
[sub_resource type="LabelSettings" id="LabelSettings_2pcfq"]
font = ExtResource("2_u12eu")
font_size = 50
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bsuwx"]
bg_color = Color(1, 0.262745, 0.615686, 1)
@ -21,6 +26,17 @@ grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_vehpn")
[node name="Label" type="Label" parent="Panel"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -73.0
offset_right = 150.0
grow_vertical = 0
text = "FPS: 0"
label_settings = SubResource("LabelSettings_2pcfq")
[node name="Panel2" type="Panel" parent="."]
anchors_preset = 15
anchor_right = 1.0