void Damage(Transform enemy) { enemy_Ai bear = enemy.GetComponent <enemy_Ai>(); if (bear != null) { bear.damagetaken(damage); } }
void laser() { enemytarget.damagetaken(damageovertime * Time.deltaTime); enemytarget.Slow(slowdown); if (!linerenderer.enabled) { linerenderer.enabled = true; } linerenderer.SetPosition(0, firePoint.position); linerenderer.SetPosition(1, target.position); }