35 lines
855 B
C#
35 lines
855 B
C#
using DragonLi.Frame;
|
|
using UnityEngine;
|
|
|
|
namespace InfiniteShooting
|
|
{
|
|
public class RobotMechDamageBox : MonoBehaviour, IDamagable
|
|
{
|
|
/// <summary>
|
|
/// We won't use this property
|
|
/// </summary>
|
|
public float Health { get; set; }
|
|
|
|
private RobotMech robotController;
|
|
|
|
private void Awake()
|
|
{
|
|
// get controller
|
|
robotController = GetComponentInParent<RobotMech>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Implemenet this function to receive damage
|
|
/// </summary>
|
|
/// <param name="value"></param>
|
|
/// <param name="info"></param>
|
|
/// <param name="_sender"></param>
|
|
public void ApplyDamage(float value, object info, Transform _sender)
|
|
{
|
|
robotController.ApplyDamage(value, info, _sender);
|
|
}
|
|
}
|
|
}
|
|
|
|
|