55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Invector;
|
|
using Invector.vCharacterController;
|
|
using Invector.vCharacterController.vActions;
|
|
using PixelCrushers;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Beyond
|
|
{
|
|
// [RequireComponent(typeof(bTriggerGenericAction))]
|
|
[RequireComponent(typeof(vIHealthController))]
|
|
public class HealableObject : MonoBehaviour, IScannable
|
|
{
|
|
// private bTriggerGenericAction m_trigger;
|
|
private HealAnimatorBase m_healAnimator;
|
|
|
|
private void Awake()
|
|
{
|
|
m_healAnimator = GetComponent<HealAnimatorBase>();
|
|
/////////// SetHealingValidator();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
// m_trigger = GetComponent<bTriggerGenericAction>();
|
|
// m_trigger.enabled = false;
|
|
// m_trigger.OnPressActionInput.AddListener(m_healAnimator.Heal);
|
|
}
|
|
|
|
public void PulseTree()
|
|
{
|
|
//enable first checker trigger to check for skill
|
|
//then it shall check whether or not we have item
|
|
//similar to trees
|
|
|
|
// m_trigger.enabled = true;
|
|
|
|
// validatorCollider.enabled = true;
|
|
//compas add here ?
|
|
if (m_healAnimator != null)
|
|
m_healAnimator.Invoke("Reveal", 1f);
|
|
}
|
|
|
|
public void OnScanned()
|
|
{
|
|
//check for skill here
|
|
|
|
//enable
|
|
|
|
PulseTree();
|
|
}
|
|
}
|
|
} |