mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-10 21:57:12 +08:00
feat(UI): 优化技能图标视觉效果并调整UI布局
- 为技能图标添加粒子效果,在冷却完成时显示 - 调整冷却进度条的着色器参数,改进视觉效果 - 修改默认游戏难度为MASTER - 重构UI布局,将技能图标整合到能量条容器中 - 调整实体升级公式,使用平方根计算难度加成
This commit is contained in:
@@ -161,8 +161,8 @@ func _physics_process(_delta: float) -> void:
|
||||
|
||||
# 通用方法
|
||||
func applyLevel():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * (GameRule.difficulty + 1)) ** level
|
||||
fields[FieldStore.Entity.DAMAGE_MULTIPILER] *= (1 + GameRule.entityDamageIncreasePerWave * (GameRule.difficulty + 1)) ** level
|
||||
fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * sqrt(GameRule.difficulty + 1)) ** level
|
||||
fields[FieldStore.Entity.DAMAGE_MULTIPILER] *= (1 + GameRule.entityDamageIncreasePerWave * sqrt(GameRule.difficulty + 1)) ** level
|
||||
func displace(direction: Vector2, isSprinting: bool = false):
|
||||
return (direction if isSprinting else direction.normalized()) * fields.get(FieldStore.Entity.MOVEMENT_SPEED) * 400 * abs(animatree.get("parameters/blend_position"))
|
||||
func move(direction: Vector2, isSprinting: bool = false):
|
||||
@@ -255,7 +255,7 @@ func tryDie(by: BulletBase):
|
||||
var item = drops[drop]
|
||||
var count = ceil(randf_range(dropCounts[drop].x, dropCounts[drop].y))
|
||||
for i in range(count):
|
||||
ItemDropped.generate(item, count, position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
|
||||
ItemDropped.generate(item, 1, position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
|
||||
if MathTool.rate(
|
||||
GameRule.appleDropRate +
|
||||
by.launcher.fields.get(FieldStore.Entity.DROP_APPLE_RATE) +
|
||||
|
||||
@@ -4,6 +4,10 @@ class_name SkillIcon
|
||||
@export var weapon: Weapon = null;
|
||||
|
||||
@onready var textureRect: TextureRect = $"%texture"
|
||||
@onready var particle: GPUParticles2D = $"%particle"
|
||||
|
||||
var showed: bool = false
|
||||
|
||||
func _ready():
|
||||
material = material.duplicate()
|
||||
func _physics_process(_delta):
|
||||
@@ -11,3 +15,9 @@ func _physics_process(_delta):
|
||||
textureRect.texture = weapon.avatarTexture
|
||||
var progress = min(weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown, UIState.player.energy / weapon.needEnergy)
|
||||
material.set_shader_parameter("progress", progress)
|
||||
if progress >= 1:
|
||||
if !showed:
|
||||
showed = true
|
||||
particle.emitting = true
|
||||
else:
|
||||
showed = false
|
||||
|
||||
@@ -9,7 +9,7 @@ enum Difficulty {
|
||||
MASTER,
|
||||
}
|
||||
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
|
||||
static var difficulty: Difficulty = Difficulty.NORMAL # 难度倍数,可以写小数
|
||||
static var difficulty: Difficulty = Difficulty.MASTER # 难度倍数,可以写小数
|
||||
static var allowFriendlyFire: bool = false # 是否允许友军伤害
|
||||
static var bulletSpeedMultiplier: float = 1 # 子弹速度倍率
|
||||
static var damageOffset: float = MathTool.percent(20) # 伤害随机浮动比例
|
||||
|
||||
Reference in New Issue
Block a user