Beispiel #1
0
    private void Update()
    {
        if (m_isShooting)
        {
            m_timer += speed * Time.deltaTime;
            RectTransformExtensions.SetHeight(m_rectTrans, m_timer);

            // Overflowed bar => Failed shot + disable
            if (RectTransformExtensions.GetHeight(m_rectTrans) >= m_height)
            {
                StopShooting();
                StartCoroutine(Hide(1.0f));
                print("failed");
            }
        }
    }
 protected override void onAwake()
 {
     this.m_defaultWidth  = RectTransformExtensions.GetWidth(base.RectTm);
     this.m_defaultHeight = RectTransformExtensions.GetHeight(base.RectTm);
 }