StarRiver-EndlessJourney-RW.../code/wisdomworm/蠕行之灾/血条.md
2023-11-19 23:04:22 +08:00

1.5 KiB

[core] @memory #:number[] updateUnitMemory: #[0]= self.hp%10, #[1]= int((self.hp%100)/10), #[2]= int((self.hp%1000)/100),#[3]= int((self.hp%10000)/1000) updateUnitMemoryRate:0

[graphics] showHealthBar:false showQueueBar:false

[decal_阈值条] layer:afterBody image:ROOT:/assets/public/hpbar.png imageScaleX:(self.resource.Hphold/self.maxHp)63 alwaysStartDirAtZero:true dirOffset:0 yOffsetAbsolute:69 pivotOffset:0 #Thanks 杰厕灵 in Code alpha:0.9 xOffsetAbsolute:((1-(self.resource.Hphold / self.maxHp)) * (-${core.radius}/1.12)) #isVisible:if self.hp > self.maxHp0.6 color:#00ffff order:0

[resource_Hphold] displayName:阈值 hidden:false

[hiddenAction_受伤触发] autoTriggerOnEvent: tookDamage() alsoTriggerAction:减少阈值 [hiddenAction_减少阈值] addResourcesWithLogic:Hphold=-int(self.resource.Hphold-self.hp)/20-2 alsoQueueAction:减少阈值 alsoTriggerOrQueueActionConditional:if self.resource.Hphold > self.hp buildSpeed:0s highPriorityQueue:true

[hiddenAction_静态血量上限绑定] autoTriggerOnEvent:created requireConditional:if self.maxHp > 0 setResourcesWithLogic:Hphold=${core.maxHp}

[hiddenAction_高于血量触发] autoTrigger:if self.resource.Hphold > self.hp addResourcesWithLogic:Hphold=-int(self.resource.Hphold-self.hp)/45-4 [hiddenAction_高于血量触发平滑设置] autoTrigger:if self.resource.Hphold > self.hp addResourcesWithLogic:Hphold=-int(self.resource.Hphold-self.hp)/60-2

[hiddenAction_低于血量重置绑定] autoTrigger:if self.resource.Hphold < self.hp setResourcesWithLogic:Hphold=self.hp