19 lines
400 B
C#
19 lines
400 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TargetingButton : MonoBehaviour
|
|
{
|
|
public Transform enemy;
|
|
|
|
public void Update()
|
|
{
|
|
if(enemy == null)
|
|
Destroy(gameObject);
|
|
}
|
|
public void TargetSelected()
|
|
{
|
|
GameObject.FindGameObjectWithTag("Player").GetComponent<PickupManager>().ShootMissle(enemy);
|
|
}
|
|
}
|