public OnCollisionEnter ( Collision col ) : void | ||
col | Collision | |
Результат | void |
void OnCollisionEnter (Collision col)
{
if (col.collider) {
Hero hero = col.gameObject.GetComponent<Hero> ();
if (null != hero) {
Logger.Log ("BigBadGuy::OnCollisionEnter hit hero", Logger.Level.INFO);
hero.subLife (_dpt);
}
}
}
}