mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
3691a06f8b
添加深海角色及其攻击逻辑,包括两种攻击方式: 1. 随机发射水泥子弹 2. 向目标发射三发追踪木制子弹 新增木制子弹资源及脚本,实现追踪效果 调整武器树和波次配置,将深海加入测试波次 优化水泥子弹和筷子子弹的动画效果
14 lines
394 B
GDScript
14 lines
394 B
GDScript
extends BulletBase
|
|
class_name WoodBullet
|
|
|
|
var speedV2: Vector2 = Vector2.ZERO
|
|
|
|
func spawn():
|
|
speedV2 = Vector2.from_angle(rotation) * 10
|
|
func ai():
|
|
if is_instance_valid(launcher.currentFocusedBoss):
|
|
speedV2 += (launcher.currentFocusedBoss.position - launcher.position).normalized() * 1
|
|
speed = speedV2.length() / 2.0
|
|
rotation = speedV2.angle()
|
|
PresetBulletAI.forward(self , rotation)
|