DayZ
1.24
Loading...
Searching...
No Matches
Bouncer.c
Go to the documentation of this file.
1
// -----------------------------------------------------------
2
class
Bouncer
3
{
4
reference
float
amount
;
5
reference
float
speed
;
6
7
protected
float
m_orginal_width
;
8
protected
float
m_orginal_height
;
9
protected
Widget
m_root
;
10
protected
ref
AnimatorTimer
m_anim
;
11
12
// -----------------------------------------------------------
13
void
Bouncer
()
14
{
15
m_anim
=
new
AnimatorTimer
();
16
}
17
18
// -----------------------------------------------------------
19
protected
void
Update
()
20
{
21
Print
(
"Update"
);
22
23
if
(
m_root
)
24
{
25
float
p
=
amount
*
m_anim
.GetValue();
26
m_root
.SetSize(
m_orginal_width
+ (
m_orginal_width
*
p
),
m_orginal_height
- (
m_orginal_height
*
p
));
27
}
28
}
29
30
// -----------------------------------------------------------
31
void
OnWidgetScriptInit
(
Widget
w
)
32
{
33
m_root
=
w
;
34
m_root
.GetSize(
m_orginal_width
,
m_orginal_height
);
35
m_anim
.AnimateLoop(
speed
);
36
}
37
};
AnimatorTimer
Definition
tools.c:705
Bouncer
Definition
Bouncer.c:3
Bouncer::amount
reference float amount
Definition
Bouncer.c:4
Bouncer::Bouncer
void Bouncer()
Definition
Bouncer.c:13
Bouncer::m_root
Widget m_root
Definition
Bouncer.c:9
Bouncer::m_orginal_height
float m_orginal_height
Definition
Bouncer.c:8
Bouncer::OnWidgetScriptInit
void OnWidgetScriptInit(Widget w)
Definition
Bouncer.c:31
Bouncer::Update
void Update()
Definition
Bouncer.c:19
Bouncer::m_orginal_width
float m_orginal_width
Definition
Bouncer.c:7
Bouncer::m_anim
ref AnimatorTimer m_anim
Definition
Bouncer.c:10
Bouncer::speed
reference float speed
Definition
Bouncer.c:5
Param3
Definition
EntityAI.c:95
Widget
Definition
EnWidgets.c:190
Print
proto void Print(void var)
Prints content of variable to console/log.
scripts
3_Game
GUI
Effects
Bouncer.c
Generated by
1.10.0