Exemplo n.º 1
0
    //Raises the shield
    public void RaiseShield()
    {
        playerVulnerability = PlayerVulnerability.Shielded;

        normalCollider.enabled = false;
        shieldCollider.enabled = true;

        StartCoroutine(FunctionLibrary.ScaleTo(shield, new Vector2(1, 1), 0.25f));
    }
Exemplo n.º 2
0
    //Collapses the shield
    public void CollapseShield()
    {
        playerVulnerability = PlayerVulnerability.Disabled;

        normalCollider.enabled = true;
        shieldCollider.enabled = false;

        StartCoroutine(FunctionLibrary.ScaleTo(shield, new Vector2(0, 0), 0.25f));
        StartCoroutine(EnableVulnerability(0.3f));
    }