1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
[gui]
on_draw="[
draw_animation('main',20,20),
if(level.player.vars.is_recharging,draw_animation('recharging_icon',20+66,20+132)),
if(level.player.vars.is_boosting, draw_animation('boosting_icon',20+66,20+100)),
draw_animation('health_level',20+2,20+160-((80.0/level.player.vars.max_hitpoints)*level.player.hitpoints*2)),
draw_animation('energy_level',20+46,20+160-((80.0/level.player.vars.max_energy)*level.player.vars.energy*2)),
if(level.player.is_wounded and cycle-object.last_sound < 7, draw_animation('low_health1',20+110,20+127)),
if(level.player.is_wounded and cycle-object.last_sound > 7 and cycle-object.last_sound < 14, draw_animation('low_health2',20+110,20+127)),
if(level.player.is_wounded and cycle-object.last_sound > 14, draw_animation('low_health3',20+110,20+127)),
draw_number(500,5,20+240,20+18),
draw_number(object.vars.experience,5,20+240,20+18+38),
draw_number(500,5,20+240,20+18+76)
]"
on_process="[
if(level.player.is_wounded,[
if(cycle-object.last_sound > 21,[
sound('MenuConfirm.ogg'),
set(object.last_sound, cycle)
])
]),
if(object.vars.experience = null(), set(object.vars.experience,level.player.experience*100)),
if(object.vars.experience > level.player.vars.experience*100,
add(object.vars.experience,-diff/10-1) where diff = object.vars.experience - level.player.vars.experience*100,
),
]"
[animation]
id=main
image=experimental/cellular/stats.png
rect=1,1,178,82
[/animation]
[animation]
id=health_level
image=experimental/cellular/health_bar_level.png
rect=0,0,19,5
[/animation]
[animation]
id=energy_level
image=experimental/cellular/energy_bar_level.png
rect=0,0,15,5
[/animation]
[animation]
id=recharging_icon
image=experimental/cellular/stats.png
rect=184,67,201,80
[/animation]
[animation]
id=boosting_icon
image=experimental/cellular/stats.png
rect=184,51,201,64
[/animation]
[animation]
id=low_health1
image=experimental/cellular/health_warning.png
rect=1,1,22,18
[/animation]
[animation]
id=low_health2
image=experimental/cellular/health_warning.png
rect=24,1,45,18
[/animation]
[animation]
id=low_health3
image=experimental/cellular/health_warning.png
rect=47,1,68,18
[/animation]
[/gui]
|