12 lines
303 B
C#
12 lines
303 B
C#
using UnityEngine;
|
|
|
|
public class Torpedo : AbstractProjectile
|
|
{
|
|
public void Setup(float speed, float damage, float lifetime, GameObject owner)
|
|
{
|
|
Launch(owner, damage);
|
|
|
|
rb.linearVelocity = rb.transform.forward * speed;
|
|
Destroy(gameObject, lifetime);
|
|
}
|
|
} |