Пример #1
0
    public void DealDamage(int dmg)
    {
        // Recalculate health and UI
        health -= dmg;
        redrawUIHearts();
        eac.PlayHurt();

        if (health <= 0)
        {
            loseGame();
        }

        GameObject controller = GameObject.FindGameObjectsWithTag("Controller")[0];

        if (controller != null)
        {
            CoinMultiplier cm = controller.GetComponent <CoinMultiplier>();
            cm.Reset();
        }
    }
Пример #2
0
 void ForceUpdate()
 {
     Reset();
     smu.UpdateWorld();
     cm.Reset();
 }