using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityGameFramework.Runtime;
///
/// 场景组件 月亮井
///
public class SceneEventMoonWellLogic : MonoBehaviour
{
private float speed = 0;
private float fullTime = 5;
private float nowTimeCount = 0;
private bool isFull = false;
private void Awake()
{
}
// Start is called before the first frame update
void Start()
{
}
public void Update()
{
if (!isFull)
{
nowTimeCount += Time.deltaTime;
if (nowTimeCount > fullTime)
{
Animator anim = this.GetComponent();
anim.Play("full");
isFull = true;
nowTimeCount = 0;
}
}
}
public void OnTriggerStay(Collider collider)
{
Role role = collider.GetComponent();
if (!role || role.isDie)
{
return;
}
if (isFull)
{
X2Battle.X2BattleManager.Instance.mBulletModel.OnCastSkill(
0, "602101",
false, X2Battle.EBulletCastPoint.ECAST_POINT_DEFLUAT, role.mData.UID, false);
isFull = false;
Animator anim = this.GetComponent();
anim.Play("empty");
}
}
public void OnTriggerEnter(Collider collider)
{
Role role = collider.GetComponent();
if (role && isFull)
{
X2Battle.X2BattleManager.Instance.mBulletModel.OnCastSkill(
0, "602101",
false, X2Battle.EBulletCastPoint.ECAST_POINT_DEFLUAT, role.mData.UID, false);
isFull = false;
Animator anim = this.GetComponent();
anim.Play("empty");
}
}
public void OnTriggerExit(Collider collider)
{
}
public void EnableCollider()
{
}
public void OnClickInteractive()
{
}
}