mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
e669bf1c30
- 移除shaking布尔变量,改用shakeIntensity控制震动强度 - 修改shake方法接受强度参数,支持叠加震动效果 - 简化震动逻辑,移除调试打印语句 feat(ItemDropped): 添加物品自动收集功能 - 当物品与玩家距离小于60时自动收集并销毁 - 调用玩家collectItem方法处理收集逻辑 refactor(EntityBase): 重构物品收集逻辑 - 将物品收集逻辑从信号回调移至collectItem方法 - 移除itemCollected信号及相关UI更新代码 - 简化hurtbox连接逻辑 style(World): 调整动画资源顺序 - 交换两个动画资源的定义顺序
22 lines
531 B
GDScript
22 lines
531 B
GDScript
extends BulletBase
|
|
class_name BigLaser
|
|
|
|
func spawn():
|
|
CameraManager.shake(5000, 100)
|
|
CameraManager.playAnimation("bigLaser")
|
|
func ai():
|
|
rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.1)
|
|
position = launcher.texture.global_position
|
|
func applyDot():
|
|
hitbox.disabled = true
|
|
await TickTool.millseconds(50)
|
|
hitbox.disabled = false
|
|
await TickTool.millseconds(50)
|
|
BulletBase.generate(
|
|
preload("res://components/Bullets/LaserPluse.tscn"),
|
|
launcher,
|
|
position,
|
|
rotation
|
|
)
|
|
return true
|