playerDamage() public method

public playerDamage ( float val ) : void
val float
return void
Esempio n. 1
0
    void OnCollisionEnter(Collision c)
    {
        GameObject other = c.gameObject;

        if (other.tag == "Player")
        {
            Player_stats p = other.GetComponent <Player_stats> ();
            if (state == "follow")
            {
                p.playerDamage(damage);
                flee();
                //be.stunMult = 1f;
            }
        }
    }