mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat(特效): 为BigLaser添加动画效果并调整参数
- 在BigLaser生成时播放"bigLaser"动画 - 增加激光的尺寸和碰撞范围 - 添加BigLaser粒子效果场景 - 调整Wave生成参数 - 在CameraManager中添加动画播放功能
This commit is contained in:
@@ -13,8 +13,8 @@ shader_parameter/laser_width = 0.01
|
||||
shader_parameter/soft_edge = 0.5
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_y85id"]
|
||||
radius = 40.0
|
||||
height = 1000.0
|
||||
radius = 60.0
|
||||
height = 2000.0
|
||||
|
||||
[node name="BigLaser" instance=ExtResource("1_cqnkd")]
|
||||
script = ExtResource("2_oqfvl")
|
||||
@@ -32,11 +32,11 @@ sprite_frames = SubResource("SpriteFrames_yip5k")
|
||||
|
||||
[node name="rect" type="ColorRect" parent="texture" index="0"]
|
||||
material = SubResource("ShaderMaterial_5n8cv")
|
||||
offset_left = -40.0
|
||||
offset_top = -1000.0
|
||||
offset_right = 40.0
|
||||
offset_left = -60.0
|
||||
offset_top = -2000.0
|
||||
offset_right = 60.0
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
position = Vector2(500, 0)
|
||||
position = Vector2(1000, 0)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_y85id")
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bx4guw2vkxgw4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_k5wxk"]
|
||||
[ext_resource type="Texture2D" uid="uid://ry8d7pst4ihf" path="res://resources/bullets/laser-pluse/frames/ball-a.svg" id="2_ob1rp"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_83opd"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_ob1rp")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hjoni"]
|
||||
resource_name = "spawn"
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 3, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 1)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:scale:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 3, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 1)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:modulate:a")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5, 1)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_s367m"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:scale:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:modulate:a")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tbgxn"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_s367m"),
|
||||
"spawn": SubResource("Animation_hjoni")
|
||||
}
|
||||
|
||||
[node name="LaserPluse" instance=ExtResource("1_k5wxk")]
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
sprite_frames = SubResource("SpriteFrames_83opd")
|
||||
|
||||
[node name="animator" parent="texture" index="0"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_tbgxn")
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Tools/WorldManager.gd" id="1_lxsxj"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfwg750a47ggx" path="res://components/Scenes/UI.tscn" id="2_04cdd"]
|
||||
@@ -6,6 +6,64 @@
|
||||
[ext_resource type="Script" path="res://scripts/Tools/CameraManager.gd" id="5_mk7bv"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckk8kahhof06u" path="res://resources/maps/Castle 2.png" id="6_p0nkj"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_kii8h"]
|
||||
resource_name = "bigLaser"
|
||||
length = 5.0
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:zoom:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 2, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5, 3)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:zoom:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 2, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5, 3)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ykpvi"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:zoom:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:zoom:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_44ixa"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_ykpvi"),
|
||||
"bigLaser": SubResource("Animation_kii8h")
|
||||
}
|
||||
|
||||
[node name="world" type="Node2D"]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("1_lxsxj")
|
||||
@@ -25,3 +83,9 @@ offset = Vector2(0, -80)
|
||||
process_callback = 0
|
||||
position_smoothing_enabled = true
|
||||
script = ExtResource("5_mk7bv")
|
||||
|
||||
[node name="animator" type="AnimationPlayer" parent="camera"]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_44ixa")
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="45" height="45" viewBox="0,0,45,45"><defs><radialGradient cx="247.7275" cy="171.1396" r="38.5299" gradientUnits="userSpaceOnUse" id="color-1"><stop offset="0" stop-color="#ffff99"/><stop offset="1" stop-color="#ff9400"/></radialGradient></defs><g transform="translate(-218,-158)"><g fill="url(#color-1)" stroke="none" stroke-miterlimit="10"><path d="M218,180.5c0,-12.4264 10.0736,-22.5 22.5,-22.5c12.4264,0 22.5,10.0736 22.5,22.5c0,12.4264 -10.0736,22.5 -22.5,22.5c-12.4264,0 -22.5,-10.0736 -22.5,-22.5z"/></g></g></svg><!--rotationCenter:22:22-->
|
||||
|
After Width: | Height: | Size: 651 B |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ry8d7pst4ihf"
|
||||
path="res://.godot/imported/ball-a.svg-0ada16ca1da72a2513ca7041117d42e8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/bullets/laser-pluse/frames/ball-a.svg"
|
||||
dest_files=["res://.godot/imported/ball-a.svg-0ada16ca1da72a2513ca7041117d42e8.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
|
||||
@@ -3,6 +3,7 @@ class_name BigLaser
|
||||
|
||||
func spawn():
|
||||
CameraManager.shake(5000)
|
||||
CameraManager.playAnimation("bigLaser")
|
||||
func ai():
|
||||
rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.1)
|
||||
position = launcher.texture.global_position
|
||||
|
||||
@@ -11,8 +11,8 @@ var per: int = 0
|
||||
static var current: int = 0
|
||||
static var data: Array[Wave] = [
|
||||
# entity, minCount, maxCount, isBoss, from, to, per
|
||||
create(preload("res://components/Characters/Hen.tscn"), 1, 5, false, 0, INF, 1),
|
||||
create(preload("res://components/Characters/Chick.tscn"), 0, 0, true, 1, INF, 4)
|
||||
create(preload("res://components/Characters/Hen.tscn"), 1, 5, false, 8, INF, 1),
|
||||
create(preload("res://components/Characters/Chick.tscn"), 0, 0, true, 0, INF, 1)
|
||||
]
|
||||
|
||||
static func create(
|
||||
|
||||
@@ -4,6 +4,8 @@ class_name CameraManager
|
||||
|
||||
@export var shakeOffset: float = 100
|
||||
|
||||
@onready var animator: AnimationPlayer = $"%animator"
|
||||
|
||||
var shaking: bool = false
|
||||
|
||||
static var instance: CameraManager = null
|
||||
@@ -22,3 +24,5 @@ static func shake(millseconds: int = 1000):
|
||||
await TickTool.millseconds(millseconds)
|
||||
instance.shaking = false
|
||||
print("shake end")
|
||||
static func playAnimation(animation: String):
|
||||
instance.animator.play(animation)
|
||||
|
||||
Reference in New Issue
Block a user