turned bullet bug into a feature

This commit is contained in:
Page Asgardius 2024-03-24 11:23:12 -07:00
parent 3fed02c051
commit 52b5a32f61
9 changed files with 145 additions and 17 deletions

View file

@ -38,7 +38,7 @@ var firstrun
const musictracks = ["res://music/midorinoakuma.wav", "res://music/seahorse.wav", "res://music/chinesegoat.wav", "res://music/doyoufeelold.wav", "res://music/doyiuneedahealer.wav", "res://music/adayatceres.wav", "res://music/twintroublemakers.wav", "res://music/easyquiz.wav", "res://music/neowave.wav", "res://music/multivectorsubmarines.wav", "res://music/halfgeniegirls.wav", "res://music/rusianmaverickfairy.wav", "res://music/blacksmithofdestruction.wav", "res://music/shininglikefireworks.wav", "res://music/sadtrashcan.wav", "res://music/akikoletter.wav", "res://music/asadcat.wav", "res://music/lilydesire.wav", "res://music/scholartrip.wav", "res://music/quantumice.wav", "res://music/unreeeal.wav"]
const sfxtracks = ["res://sfx/braindamage.wav", "res://sfx/gaugefill.wav", "res://sfx/boomboombakudan.wav"]
var debug = false
const release = "R0.1.4-alpha"
const release = "R0.1.4-dev"
var sk = false
var xm = 0
var ym = 0

View file

@ -0,0 +1,40 @@
extends Area2D
var velocity: Vector2 = Vector2()
var direction
var speciality = 3
var btype
# Called when the node enters the scene tree for the first time.
func _ready():
add_to_group(btype)
#pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _physics_process(delta):
pass
func _on_body_entered(body):if !body.is_in_group(btype):
if body.is_in_group("players") || body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == 3:
print("weak to fire")
#if body.is_in_group("players"):
# Global.live = 2
#elif body.is_in_group("enemies"):
# Global.live = 3
#elif body.is_in_group("boss"):
# Global.live = 3
#queue_free()
func _on_area_entered(area):
if !area.is_in_group(btype):
queue_free()
#pass # Replace with function body.
func _on_timer_timeout():
queue_free()

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="275"
height="275"
id="svg2">
<defs
id="defs4" />
<g
transform="translate(-295.17857,-338.61217)"
id="layer1">
<path
d="m 296.78571,612.63003 c 0,0 104.06285,-132.7859 104.06285,-132.7859 0,0 -104.06285,-140.24982 -104.06285,-140.24982 l 67.30299,0 c 0,0 83.34749,113.48826 83.34749,113.48826 l -126.86477,159.54746 -23.78571,0 z M 417.28794,500.06578 544.11662,339.59431 c 0,0 24.45481,0 24.45481,0 L 464.47749,471.26578 c 0,0 104.09394,141.36425 104.09394,141.36425 l -67.30357,0 c 0,0 -83.97992,-112.56425 -83.97992,-112.56425 z"
id="path2830"
style="fill:#000000" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 860 B

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dr52x3yif0wtw"
path="res://.godot/imported/X11.svg-b7d21ecbd13e564cd4c209aae272d596.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/common/bullet/X11.svg"
dest_files=["res://.godot/imported/X11.svg-b7d21ecbd13e564cd4c209aae272d596.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,26 @@
[gd_scene load_steps=4 format=3 uid="uid://dnufhjr63cddd"]
[ext_resource type="Script" path="res://sprites/common/bullet/X11.gd" id="1_sd1jl"]
[ext_resource type="Texture2D" uid="uid://dr52x3yif0wtw" path="res://sprites/common/bullet/X11.svg" id="2_nkqom"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_g125y"]
[node name="X11" type="Area2D"]
script = ExtResource("1_sd1jl")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)
texture = ExtResource("2_nkqom")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_g125y")
[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
[node name="Timer" type="Timer" parent="."]
wait_time = 0.3
autostart = true
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

View file

@ -3,8 +3,10 @@ var velocity: Vector2 = Vector2()
var direction
var speed = 100
var btype
var isvisible
# Called when the node enters the scene tree for the first time.
func _ready():
isvisible = $VisibleOnScreenNotifier2D
add_to_group(btype)
#pass # Replace with function body.
@ -14,6 +16,7 @@ func _process(delta):
pass
func _physics_process(delta):
if isvisible.is_on_screen():
if direction == null:
position += velocity * delta
else:
@ -34,8 +37,6 @@ func _on_body_entered(body):
queue_free()
func _on_screen_exited():
queue_free()
func _on_area_entered(area):

View file

@ -16,7 +16,9 @@ texture = ExtResource("1_ues2l")
position = Vector2(0.5, 0)
shape = SubResource("RectangleShape2D_g125y")
[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
position = Vector2(-7.15256e-07, -1.43051e-06)
scale = Vector2(3, 3)
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View file

@ -3,8 +3,10 @@ var velocity: Vector2 = Vector2()
var direction
var speed = 100
var btype
var isvisible
# Called when the node enters the scene tree for the first time.
func _ready():
isvisible = $VisibleOnScreenNotifier2D
add_to_group(btype)
#pass # Replace with function body.
@ -14,6 +16,7 @@ func _process(delta):
pass
func _physics_process(delta):
if isvisible.is_on_screen():
if direction == null:
position += velocity * delta
else:
@ -34,10 +37,6 @@ func _on_body_entered(body):
queue_free()
func _on_screen_exited():
queue_free()
func _on_area_entered(area):
if !area.is_in_group(btype):
queue_free()

View file

@ -15,7 +15,9 @@ texture = ExtResource("2_0alhu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_g125y")
[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
position = Vector2(-7.15256e-07, -1.43051e-06)
scale = Vector2(3, 3)
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]