Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        PlatformerController controller = other.gameObject.GetComponent <PlatformerController>();

        if (controller && controller.HasControl())
        {
            //let player die
            StartCoroutine(PlayerDeath(other.gameObject));
        }
    }
Esempio n. 2
0
    void OnTriggerEnter(Collider other)
    {
        PlatformerController controller = other.gameObject.GetComponent <PlatformerController>();
        PlayerCombat         combat     = other.GetComponent <PlayerCombat>();
        grimInfo             info       = other.GetComponent <grimInfo> ();
        int spikeDamage = 1;

        if (controller && controller.HasControl())
        {
            info.Damage(spikeDamage);
        }
    }