26 lines
455 B
C#
26 lines
455 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
|
|
public class EjectorBomb : MonoBehaviour
|
|
{
|
|
[SerializeField] private Bomb _bomb;
|
|
|
|
private FixedJoint _fixedJoint;
|
|
|
|
private void Awake()
|
|
{
|
|
_fixedJoint = GetComponent<FixedJoint>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (InputController.IsDropping)
|
|
{
|
|
_bomb.Activate();
|
|
Destroy(_fixedJoint);
|
|
}
|
|
}
|
|
}
|