[gd_scene load_steps=7 format=2]

[ext_resource path="res://hitbox.gd" type="Script" id=1]
[ext_resource path="res://target4.png" type="Texture" id=2]
[ext_resource path="res://expand.gd" type="Script" id=3]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 32, 32 )

[sub_resource type="Shader" id=2]
code = "// NOTE: Shader automatically converted from Godot Engine 3.4.4.stable's CanvasItemMaterial.

shader_type canvas_item;
render_mode blend_mix;
uniform float speed = 5f;

vec2 rotateUV(vec2 uv, float rotation)
{
    float mid = 0.5;
    return vec2(
        cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,
        cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid
    );
}

void vertex() {
	UV= rotateUV((UV*0.75)+vec2(0.125),TIME*speed );

}

void fragment() {
	vec4 albedo_tex = texture(TEXTURE,UV);
	COLOR.rgb = albedo_tex.rgb + vec3(sin(TIME*10.0)/10.0);
	COLOR.a = albedo_tex.a;
}
"

[sub_resource type="ShaderMaterial" id=3]
shader = SubResource( 2 )
shader_param/speed = 5.0

[node name="hitbox" type="Area2D"]
script = ExtResource( 1 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )

[node name="Timer" type="Timer" parent="."]
autostart = true

[node name="Target4" type="Sprite" parent="."]
modulate = Color( 2, 2, 0, 1 )
material = SubResource( 3 )
texture = ExtResource( 2 )

[node name="expand" type="Node" parent="."]
script = ExtResource( 3 )
nodepath = NodePath("../Target4")

[connection signal="body_entered" from="." to="." method="_on_hitbox_body_entered"]
