mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器): 添加钢管武器蓄力特效和音效
- 为钢管武器添加蓄力粒子效果 - 新增钢管落地音效资源 - 修改钢管子弹碰撞形状为圆形 - 添加钢管武器能量消耗和冷却时间配置 - 实现钢管子弹销毁时的落地效果
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
extends EntityBase
|
||||
class_name Rooster
|
||||
|
||||
@onready var chargeParticle: GPUParticles2D = $%chargeParticle
|
||||
|
||||
func register():
|
||||
attackCooldownMap[0] = 200
|
||||
attackCooldownMap[1] = 6000
|
||||
@@ -11,6 +13,7 @@ func register():
|
||||
elif bullet is FoxZhua:
|
||||
EffectController.create(ComponentManager.getEffect("BloodFall"), texture.global_position).shot()
|
||||
)
|
||||
chargeParticle.emitting = false
|
||||
var chargeStartTime = {}
|
||||
|
||||
func ai():
|
||||
@@ -62,6 +65,7 @@ func startCharge(weaponIndex: int):
|
||||
var weapon = weapons[weaponIndex]
|
||||
if weapon.chargable:
|
||||
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
|
||||
chargeParticle.emitting = true
|
||||
func endCharge(weaponIndex: int):
|
||||
if chargeStartTime.has(weaponIndex):
|
||||
var startTime = chargeStartTime[weaponIndex]
|
||||
@@ -73,3 +77,4 @@ func endCharge(weaponIndex: int):
|
||||
if weapon.chargable:
|
||||
weapon.chargedTime = chargedTime
|
||||
tryAttack(weaponIndex)
|
||||
chargeParticle.emitting = false
|
||||
|
||||
Reference in New Issue
Block a user