-
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.
Merge branch 'dev' of https://github.com/SkyUOI/Zenith into dev
- Loading branch information
Showing
13 changed files
with
375 additions
and
64 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[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="Texture2D" uid="uid://co2n6okllm0tl" path="res://scenes/bullets/terra_blade/terra_blade_beam.png" id="2_n1wh2"] | ||
|
||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1ieue"] | ||
radius = 8.48517 | ||
height = 86.9787 | ||
|
||
[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="."] | ||
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="."] | ||
|
||
[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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends Area2D | ||
|
||
var tween = create_tween() | ||
|
||
|
||
func straight_move( | ||
from: Vector2, to: Vector2, time: float, ease_: Tween.EaseType, trans: Tween.TransitionType | ||
): | ||
rotation = (to - from).angle() | ||
position = from | ||
tween.tween_property(self, "position", to, time).set_ease(ease_).set_trans(trans) | ||
|
||
|
||
func _on_out_screen_screen_exited(): | ||
queue_free() | ||
|
||
#func _ready(): | ||
#straight_move(Vector2(100, 100), Vector2(500, 500), 2, Tween.EASE_IN, Tween.TRANS_CUBIC) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://co2n6okllm0tl" | ||
path="res://.godot/imported/terra_blade_beam.png-dfbb4da47e4409ffc1ad54c30cbe297c.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://scenes/bullets/terra_blade/terra_blade_beam.png" | ||
dest_files=["res://.godot/imported/terra_blade_beam.png-dfbb4da47e4409ffc1ad54c30cbe297c.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 |
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,23 @@ | ||
extends Node2D | ||
|
||
var rad: float | ||
var center: Vector2 | ||
var r: float | ||
|
||
|
||
func _draw(): | ||
draw_arc(center, r, -TAU / 4, -TAU / 4 + rad, 50, Color(0, 1, 0), 30, true) | ||
|
||
|
||
func draw(rad_: float, center_: Vector2, r_: float): | ||
rad = rad_ | ||
center = center_ | ||
r = r_ | ||
queue_redraw() | ||
|
||
|
||
func draw2(r_: float, rad_: float, center_: Vector2): | ||
rad = rad_ | ||
center = center_ | ||
r = r_ | ||
queue_redraw() |
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,16 @@ | ||
extends Node2D | ||
|
||
var r: float | ||
var alpha: float | ||
var center: Vector2 | ||
|
||
|
||
func _draw(): | ||
draw_circle(center, r, Color(0, 1, 0, alpha), true, -1, true) | ||
|
||
|
||
func draw(r_, center_): | ||
r = r_ | ||
alpha = (270.0 - r_) / 270.0 | ||
center = center_ | ||
queue_redraw() |
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 @@ | ||
[gd_scene load_steps=6 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"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/circle_painter.gd" id="4_nmed2"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/round_painter.gd" id="5_abxlu"] | ||
|
||
[node name="TerraBlade" type="Node"] | ||
script = ExtResource("1_1hrqx") | ||
terra_blade_beam = ExtResource("2_yp2sf") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
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 | ||
|
||
[node name="CirclePainter" type="Node2D" parent="."] | ||
script = ExtResource("4_nmed2") | ||
|
||
[node name="RoundPainter" type="Node2D" parent="."] | ||
script = ExtResource("5_abxlu") |
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 @@ | ||
[gd_scene load_steps=6 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"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/circle_painter.gd" id="4_nmed2"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/round_painter.gd" id="5_abxlu"] | ||
|
||
[node name="TerraBlade" type="Node"] | ||
script = ExtResource("1_1hrqx") | ||
terra_blade_beam = ExtResource("2_yp2sf") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
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 | ||
|
||
[node name="CirclePainter" type="Node2D" parent="."] | ||
script = ExtResource("4_nmed2") | ||
|
||
[node name="RoundPainter" type="Node2D" parent="."] | ||
script = ExtResource("5_abxlu") |
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,33 @@ | ||
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, 200) | ||
|
||
# 绘制特效 | ||
tween.tween_interval(0.5) | ||
tween.tween_method($CirclePainter.draw.bind(center, 170), 0.0, TAU, 0.6) | ||
tween.tween_method($CirclePainter.draw2.bind(TAU, center), 170.0, 0, 0.8).set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_CUBIC) | ||
tween.tween_callback(func(): create_tween().tween_method($RoundPainter.draw.bind(center), 0.0, 270.0, 1.2).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)) | ||
|
||
|
||
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 = 2000 * 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)) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://cykbxj82pu7no" | ||
path="res://.godot/imported/terra_blade.png-77d6b7fb90fcf4c2a2b672096828604f.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://scenes/weapons/terra_blade/terra_blade.png" | ||
dest_files=["res://.godot/imported/terra_blade.png-77d6b7fb90fcf4c2a2b672096828604f.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 |
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 @@ | ||
[gd_scene load_steps=6 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"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/circle_painter.gd" id="4_nmed2"] | ||
[ext_resource type="Script" path="res://scenes/weapons/terra_blade/round_painter.gd" id="5_abxlu"] | ||
|
||
[node name="TerraBlade" type="Node"] | ||
script = ExtResource("1_1hrqx") | ||
terra_blade_beam = ExtResource("2_yp2sf") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
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 | ||
|
||
[node name="CirclePainter" type="Node2D" parent="."] | ||
script = ExtResource("4_nmed2") | ||
|
||
[node name="RoundPainter" type="Node2D" parent="."] | ||
script = ExtResource("5_abxlu") |