1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-09 13:17:12 +08:00

Add new styleboxes and import energy texture

- Created a new SVG import for the energy texture, enabling better resource management and compression.
- Added a StyleBoxFlat resource for the top left panel with specified margins, background color, border width, and corner radius.
- Introduced a StyleBoxFlat resource for the top panel with similar properties, ensuring consistent UI design across panels.
This commit is contained in:
2025-08-27 11:08:11 +08:00
parent 0648ed75d0
commit b3b4fdafc2
10 changed files with 144 additions and 41 deletions
+15 -10
View File
@@ -37,12 +37,12 @@ func hit(target: Node):
if !indisDamage && !GameRule.allowFriendlyFire:
if entity.isPlayer() == launcher.isPlayer(): return
entity.takeDamage(self, MathTool.rate(launcher.fields.get(FieldStore.Entity.CRIT_RATE)))
if !MathTool.rate(fullPenerate()):
if !MathTool.rate(fullPenerate(entity)):
destroy()
func forward(direction: Vector2):
position += direction.normalized() * fields.get(FieldStore.Bullet.SPEED) * GameRule.bulletSpeedMultiplier
func fullPenerate():
return fields.get(FieldStore.Bullet.PENERATE) * (1 + launcher.fields.get(FieldStore.Entity.PENERATE))
func fullPenerate(target: EntityBase):
return fields.get(FieldStore.Bullet.PENERATE) * (1 + launcher.fields.get(FieldStore.Entity.PENERATE)) - target.fields.get(FieldStore.Entity.PENARATION_RESISTANCE)
func ai():
pass
@@ -56,10 +56,15 @@ static func generate(
spawnRotation: float,
addToWorld: bool = true
):
var instance: BulletBase = bullet.instantiate()
instance.launcher = launchBy
instance.position = spawnPosition
instance.rotation = spawnRotation + deg_to_rad(randf_range(-launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT), launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT)))
if addToWorld:
WorldManager.rootNode.add_child(instance)
return instance
var extraCount = launchBy.fields.get(FieldStore.Entity.EXTRA_BULLET_COUNT)
var count = 1 + floor(extraCount) + int(MathTool.rate(extraCount - floor(extraCount)))
var instances = []
for i in range(count):
var instance: BulletBase = bullet.instantiate()
instance.launcher = launchBy
instance.position = spawnPosition
instance.rotation = spawnRotation + deg_to_rad(randf_range(-launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT), launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT)))
if addToWorld:
WorldManager.rootNode.add_child(instance)
instances.append(instance)
return instances