1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-23 12:02:30 +08:00

feat: 添加炸弹效果和着色器,创建新的Bomb效果和相关资源

This commit is contained in:
2025-08-27 14:55:34 +08:00
parent 28b86e8b1e
commit 9127692146
11 changed files with 86 additions and 16 deletions
+5 -2
View File
@@ -12,8 +12,9 @@ class_name BulletBase
@export var canDamageSelf: bool = false # 是否可以伤害发射者
@export var needEnergy: float = 4.0 # 发射时需要消耗的能量
@onready var animator = $"%animator"
@onready var hitbox = $"%hitbox"
@onready var animator: AnimationPlayer = $"%animator"
@onready var hitbox: CollisionShape2D = $"%hitbox"
@onready var texture: AnimatedSprite2D = $"%texture"
var launcher: EntityBase = null
var spawnInWhen: float = 0
@@ -51,6 +52,8 @@ func forward(direction: Vector2):
position += direction.normalized() * fields.get(FieldStore.Bullet.SPEED) * GameRule.bulletSpeedMultiplier
func fullPenerate():
return fields.get(FieldStore.Bullet.PENERATE) + launcher.fields.get(FieldStore.Entity.PENERATE)
func timeLived():
return Time.get_ticks_msec() - spawnInWhen
func ai():
pass