예제 #1
0
    void Damage(Transform enemy)
    {
        enemy_Ai bear = enemy.GetComponent <enemy_Ai>();

        if (bear != null)
        {
            bear.damagetaken(damage);
        }
    }
예제 #2
0
    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);
    }