Beispiel #1
0
    // LateUpdate
    void LateUpdate()
    {
        base.LateUpdate();
        float r, g, b, a;
        Color color;

        // hande shadow-specific effects
        switch (m_Anim)
        {
        case "Fade":
            color = m_SpriteColor;
            a     = m_SpriteRenderer.color.a;
            r     = color.r;
            g     = color.g;
            b     = color.b;

            m_SpriteRenderer.color = new Color(r, g, b,
                                               a - a * Time.deltaTime * .75f);

            if (m_SpriteRenderer.color.a <= .1)
            {
                m_DuelController.stopDuel();
                DestroyImmediate(gameObject);
            }

            break;
        }
    }
Beispiel #2
0
 // ProcessDead
 protected override void ProcessDead()
 {
     m_DuelController.stopDuel();
 }