Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 };
Print
proto void Print(void var)
Prints content of variable to console/log.
Bouncer
Definition: bouncer.c:2
Widget
Definition: enwidgets.c:189
AnimatorTimer
Definition: tools.c:748