mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-08 02:57:06 +08:00
feat(角色): 更新Kernyr角色行为和外观
- 修改Kernyr的攻击模式,增加3种攻击类型 - 更新角色贴图和显示名称 - 调整阳毅导弹的尺寸和动画效果 - 修复Diamond子弹追踪时的空引用问题 - 调整测试波次配置
This commit is contained in:
@@ -15,6 +15,21 @@ animations = [{
|
|||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_peenw"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_c3irh"]
|
[sub_resource type="Animation" id="Animation_c3irh"]
|
||||||
resource_name = "loop"
|
resource_name = "loop"
|
||||||
loop_mode = 1
|
loop_mode = 1
|
||||||
@@ -32,21 +47,6 @@ tracks/0/keys = {
|
|||||||
"values": [0.0, 6.283185307179586]
|
"values": [0.0, 6.283185307179586]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_peenw"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath(".:rotation")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [0.0]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_x2cof"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_x2cof"]
|
||||||
_data = {
|
_data = {
|
||||||
&"RESET": SubResource("Animation_peenw"),
|
&"RESET": SubResource("Animation_peenw"),
|
||||||
@@ -54,7 +54,7 @@ _data = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_x2cof"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_x2cof"]
|
||||||
size = Vector2(94, 94)
|
size = Vector2(48, 48)
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_c3irh"]
|
[sub_resource type="Curve" id="Curve_c3irh"]
|
||||||
_data = [Vector2(0, 0.8), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
_data = [Vector2(0, 0.8), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
@@ -74,19 +74,19 @@ initial_velocity_max = 1500.0
|
|||||||
angular_velocity_min = -100.000015
|
angular_velocity_min = -100.000015
|
||||||
angular_velocity_max = 99.999985
|
angular_velocity_max = 99.999985
|
||||||
gravity = Vector3(0, 0, 0)
|
gravity = Vector3(0, 0, 0)
|
||||||
scale_min = 0.79999995
|
scale_min = 0.39999998
|
||||||
scale_max = 0.79999995
|
scale_max = 0.39999998
|
||||||
alpha_curve = SubResource("CurveTexture_peenw")
|
alpha_curve = SubResource("CurveTexture_peenw")
|
||||||
|
|
||||||
[node name="Yangyi" instance=ExtResource("1_i51w8")]
|
[node name="Yangyi" instance=ExtResource("1_i51w8")]
|
||||||
script = ExtResource("2_sku1m")
|
script = ExtResource("2_sku1m")
|
||||||
displayName = "超级导弹"
|
displayName = "超级阳毅导弹"
|
||||||
speed = 20.0
|
speed = 20.0
|
||||||
lifeTime = 3000.0
|
lifeTime = 3000.0
|
||||||
autoLoopAnimation = true
|
autoLoopAnimation = true
|
||||||
|
|
||||||
[node name="texture" parent="." index="0"]
|
[node name="texture" parent="." index="0"]
|
||||||
scale = Vector2(0.15, 0.15)
|
scale = Vector2(0.075, 0.075)
|
||||||
sprite_frames = SubResource("SpriteFrames_peenw")
|
sprite_frames = SubResource("SpriteFrames_peenw")
|
||||||
|
|
||||||
[node name="animator" parent="texture" index="0"]
|
[node name="animator" parent="texture" index="0"]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_bha5j"]
|
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_bha5j"]
|
||||||
[ext_resource type="Script" uid="uid://m28dwfwmmhmh" path="res://scripts/Contents/Characters/Kernyr.gd" id="2_vkls3"]
|
[ext_resource type="Script" uid="uid://m28dwfwmmhmh" path="res://scripts/Contents/Characters/Kernyr.gd" id="2_vkls3"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cts825oc08b7k" path="res://resources/bullets/yangyi/ppn.jpg" id="3_vkls3"]
|
[ext_resource type="Texture2D" uid="uid://d34vkibm8a5e7" path="res://resources/characters/kernyr/koshino.jpg" id="3_vkls3"]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_vkls3"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_vkls3"]
|
||||||
animations = [{
|
animations = [{
|
||||||
@@ -22,7 +22,7 @@ size = Vector2(118, 98)
|
|||||||
|
|
||||||
[node name="Kernyr" instance=ExtResource("1_bha5j")]
|
[node name="Kernyr" instance=ExtResource("1_bha5j")]
|
||||||
script = ExtResource("2_vkls3")
|
script = ExtResource("2_vkls3")
|
||||||
displayName = "TestBoss"
|
displayName = "主核"
|
||||||
drops = Array[int]([0, 1])
|
drops = Array[int]([0, 1])
|
||||||
dropCounts = Array[Vector2]([Vector2(30, 50), Vector2(20, 40)])
|
dropCounts = Array[Vector2]([Vector2(30, 50), Vector2(20, 40)])
|
||||||
appleCount = Vector2i(2, 5)
|
appleCount = Vector2i(2, 5)
|
||||||
@@ -39,4 +39,4 @@ texture = ExtResource("3_vkls3")
|
|||||||
shape = SubResource("RectangleShape2D_vkls3")
|
shape = SubResource("RectangleShape2D_vkls3")
|
||||||
|
|
||||||
[node name="statebar" parent="." index="4"]
|
[node name="statebar" parent="." index="4"]
|
||||||
position = Vector2(0, -135)
|
position = Vector2(0, -144)
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ class_name Diamond
|
|||||||
const traceTime = 1500
|
const traceTime = 1500
|
||||||
|
|
||||||
func ai():
|
func ai():
|
||||||
PresetBulletAI.forward(self, rotation)
|
PresetBulletAI.forward(self , rotation)
|
||||||
if timeLived() < traceTime:
|
if timeLived() < traceTime && is_instance_valid(launcher.currentFocusedBoss):
|
||||||
PresetBulletAI.trace(self, launcher.currentFocusedBoss.getTrackingAnchor(), 0.05)
|
PresetBulletAI.trace(self , launcher.currentFocusedBoss.getTrackingAnchor(), 0.05)
|
||||||
|
|||||||
@@ -1,21 +1,38 @@
|
|||||||
extends EntityBase
|
extends EntityBase
|
||||||
class_name Kernyr
|
class_name Kernyr
|
||||||
|
|
||||||
|
var attack1Angle = 0
|
||||||
|
var attack0State = 0
|
||||||
|
|
||||||
func register():
|
func register():
|
||||||
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
||||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.1
|
|
||||||
fields[FieldStore.Entity.OFFSET_SHOOT] = 20
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 20
|
||||||
attackCooldownMap[0] = 300
|
attackCooldownMap[0] = 1000
|
||||||
|
attackCooldownMap[1] = 100
|
||||||
|
attackCooldownMap[2] = 1000
|
||||||
func ai():
|
func ai():
|
||||||
PresetEntityAI.follow(self , currentFocusedBoss)
|
|
||||||
tryAttack(0)
|
tryAttack(0)
|
||||||
|
tryAttack(1)
|
||||||
|
tryAttack(2)
|
||||||
func attack(type: int):
|
func attack(type: int):
|
||||||
if type == 0:
|
if type == 0:
|
||||||
for bullet in BulletBase.generate(
|
var states = [
|
||||||
|
Vector2(-1, 1),
|
||||||
|
Vector2(1, 1),
|
||||||
|
Vector2(1, -1),
|
||||||
|
Vector2(-1, -1)
|
||||||
|
]
|
||||||
|
await sprintTo(currentFocusedBoss.position + 400 * states[attack0State % len(states)], 0.1)
|
||||||
|
attack0State += 1
|
||||||
|
BulletBase.generate(ComponentManager.getBullet("HeavyCrystal"), self , findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
|
||||||
|
elif type == 1:
|
||||||
|
BulletBase.generate(
|
||||||
ComponentManager.getBullet("Yangyi"),
|
ComponentManager.getBullet("Yangyi"),
|
||||||
self ,
|
self ,
|
||||||
position,
|
position,
|
||||||
position.angle_to_point(currentFocusedBoss.position)
|
attack1Angle
|
||||||
):
|
)
|
||||||
if bullet is YangyiBullet:
|
attack1Angle += deg_to_rad(360.0 / 20)
|
||||||
pass
|
elif type == 2:
|
||||||
|
for i in randi_range(7, 16):
|
||||||
|
BulletBase.generate(ComponentManager.getBullet("Diamond"), self , position + MathTool.sampleInCircle(20), rotation + deg_to_rad(randf_range(-90, 90)))
|
||||||
|
|||||||
@@ -38,19 +38,19 @@ static var WAVE_TESTBOSS_ALL = [
|
|||||||
Wave.create("Bear", 0, 0, true, 2, INF, 3),
|
Wave.create("Bear", 0, 0, true, 2, INF, 3),
|
||||||
]
|
]
|
||||||
static var WAVE_TESTBOSS_KUKE = [
|
static var WAVE_TESTBOSS_KUKE = [
|
||||||
Wave.create("KukeMC", 0, 0, true, 0, INF, 10),
|
Wave.create("KukeMC", 0, 0, true, 0, INF, 1),
|
||||||
]
|
]
|
||||||
static var WAVE_TESTBOSS_BEAR = [
|
static var WAVE_TESTBOSS_BEAR = [
|
||||||
Wave.create("Bear", 0, 0, true, 0, INF, 10),
|
Wave.create("Bear", 0, 0, true, 0, INF, 1),
|
||||||
]
|
]
|
||||||
static var WAVE_TESTBOSS_CHICK = [
|
static var WAVE_TESTBOSS_CHICK = [
|
||||||
Wave.create("Chick", 0, 0, true, 0, INF, 10),
|
Wave.create("Chick", 0, 0, true, 0, INF, 1),
|
||||||
]
|
]
|
||||||
static var WAVE_JUSTJOKE = [
|
static var WAVE_JUSTJOKE = [
|
||||||
Wave.create("Kernyr", 0, 0, true, 0, INF, 1),
|
Wave.create("Kernyr", 0, 0, true, 0, INF, 1),
|
||||||
]
|
]
|
||||||
static var WAVE_EMPTY = []
|
static var WAVE_EMPTY = []
|
||||||
static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_TESTBOSS_KUKE
|
static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_JUSTJOKE
|
||||||
|
|
||||||
static func create(
|
static func create(
|
||||||
entity_: String,
|
entity_: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user