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 77 78 79
|
[object_type]
id=text_controller_fading
ignore_collide=true
zorder=50
on_create="[set(alpha, 0), if(txt, text(txt, font, size)),animation('fadein')]"
on_end_fadein_anim="animation('normal')"
on_end_normal_anim="animation('normal')"
on_end_fadeout_anim="animation('invisible')"
on_end_invisible_anim="animation('invisible')"
on_enter_invisible_anim="set(text_alpha,0)"
on_enter_normal_anim="set(text_alpha,255)"
on_process_fadein="set(text_alpha, (time_in_animation * 255)/100 )"
on_process_fadeout="set(text_alpha, ((100-time_in_animation) * 255)/100 )"
on_hide="animation('fadeout')"
[vars]
txt="'TEXT'"
size=1
[/vars]
[editor_info]
category=controllers
[var]
name=txt
type=text
value="'TEXT'"
[/var]
[var]
name=font
type=text
value="'door_label'"
[/var]
[var]
name=size
value="1"
[/var]
[/editor_info]
[properties]
set_text="def(text) [set(vars.txt, text), fire_event(me, 'create')]"
hide="def() [fire_event(me, 'hide')]"
[/properties]
[base:animation]
image=effects/particles.png
x=148
y=42
w=28
h=28
frames=1
[/animation]
[animation]
id=fadein
duration=100
[/animation]
[animation]
id=fadeout
duration=100
[/animation]
[animation]
id=normal
duration=100
[/animation]
[animation]
id=invisible
duration=100
[/animation]
[/object_type]
|