
New laser obstacle uses particle system, UI not yet implemented, but classess for ui was added
19 lines
363 B
C#
19 lines
363 B
C#
using UnityEngine;
|
|
|
|
public class Turret : MonoBehaviour, IObstacle, IDamageDealer, IResettable
|
|
{
|
|
public void DealDamage(IDamageable target, int amount)
|
|
{
|
|
target.TakeDamage(amount);
|
|
}
|
|
|
|
public void Impact()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public void ResetToDefault()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
} |