-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: delete glow and add terra_blade's begin function
- Loading branch information
1 parent
6a2c279
commit bc5eab7
Showing
6 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,29 @@ | ||
[gd_scene load_steps=7 format=3 uid="uid://1megnlcsse45"] | ||
[gd_scene load_steps=4 format=3 uid="uid://1megnlcsse45"] | ||
|
||
[ext_resource type="Script" path="res://scenes/bullets/terra_blade/terra_blade_beam.gd" id="1_va6li"] | ||
[ext_resource type="Shader" path="res://scenes/bullets/terra_blade/TerraBladeBeam.gdshader" id="2_aqn2b"] | ||
[ext_resource type="Texture2D" uid="uid://co2n6okllm0tl" path="res://scenes/bullets/terra_blade/terra_blade_beam.png" id="2_n1wh2"] | ||
|
||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_awmjb"] | ||
shader = ExtResource("2_aqn2b") | ||
|
||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1ieue"] | ||
radius = 8.48517 | ||
height = 86.9787 | ||
|
||
[sub_resource type="Environment" id="Environment_jcpgb"] | ||
background_mode = 3 | ||
glow_enabled = true | ||
|
||
[node name="TerraBladeBeam" type="Area2D"] | ||
position = Vector2(600, 384) | ||
scale = Vector2(1.5, 1.5) | ||
script = ExtResource("1_va6li") | ||
metadata/_edit_group_ = true | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
material = SubResource("ShaderMaterial_awmjb") | ||
position = Vector2(-23.0017, 1.05356) | ||
rotation = 0.785398 | ||
scale = Vector2(1.5, 1.5) | ||
texture = ExtResource("2_n1wh2") | ||
offset = Vector2(10.3465, -11.3398) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
rotation = 1.5708 | ||
shape = SubResource("CapsuleShape2D_1ieue") | ||
|
||
[node name="OutScreen" type="VisibleOnScreenNotifier2D" parent="."] | ||
|
||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] | ||
environment = SubResource("Environment_jcpgb") | ||
|
||
[connection signal="screen_exited" from="OutScreen" to="." method="_on_out_screen_screen_exited"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extends Node | ||
|
||
@export var terra_blade_beam : PackedScene | ||
var tween = create_tween() | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
begin() | ||
|
||
func begin(): | ||
$Sprite2D.position = Vector2(-500, 1000) | ||
var center = Vector2(570, 150) | ||
var radial_shot = func(num: int, r: float): | ||
var unit_rad = TAU / num | ||
for i in range(0, num): | ||
var beam = terra_blade_beam.instantiate() | ||
get_parent().add_child.call_deferred(beam) | ||
var rad = r + unit_rad * i | ||
var to = 1500 * Vector2(cos(rad), sin(rad)) | ||
beam.straight_move(center, center + to, 1.5, Tween.EASE_IN, Tween.TRANS_CIRC) | ||
|
||
tween.tween_callback(radial_shot.bind(24, 0)) | ||
tween.tween_interval(0.2) | ||
tween.tween_callback(radial_shot.bind(24, TAU / 48)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://clwl2jjjehebp"] | ||
[gd_scene load_steps=4 format=3 uid="uid://clwl2jjjehebp"] | ||
|
||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/terra_blade.gd" id="1_1hrqx"] | ||
[ext_resource type="Texture2D" uid="uid://cykbxj82pu7no" path="res://scenes/weapons/terra_blade/terra_blade.png" id="1_477b2"] | ||
[ext_resource type="PackedScene" uid="uid://1megnlcsse45" path="res://scenes/bullets/terra_blade/TerraBladeBeam.tscn" id="2_yp2sf"] | ||
|
||
[node name="TerraBlade" type="Node"] | ||
script = ExtResource("1_1hrqx") | ||
terra_blade_beam = ExtResource("2_yp2sf") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
position = Vector2(572, 307) | ||
position = Vector2(527.511, 314.206) | ||
rotation = 0.748746 | ||
scale = Vector2(2.3, 2.3) | ||
texture = ExtResource("1_477b2") | ||
offset = Vector2(12.0369, -15.4621) | ||
metadata/_edit_group_ = true |