Exemple #1
0
    public void HitWindow()
    {
        _root.PlayDecodeFailedSound();

        if (_alienAttackManager._left)
        {
            _root.AttackSoundLeft();
            _root.ForceShake(1, 2, .1f);
        }

        if (_alienAttackManager._right)
        {
            _root.AttackSoundRight();
            _root.ForceShake(-1, 2, .1f);
        }

        GameObject go = GameObject.FindGameObjectWithTag("Signal");

        if (go)
        {
            go.GetComponent <Signal>().Disorder();
        }
    }