1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- [gd_scene load_steps=8 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]
- [ext_resource path="res://sounds/woosh.ogg" type="AudioStream" id=4]
- [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")
- [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
- stream = ExtResource( 4 )
- bus = "sfx"
- [connection signal="body_entered" from="." to="." method="_on_hitbox_body_entered"]
|