You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 管理特效
/// </summary>
public class EffectManager : MonoSingleton<EffectManager>
{
[Header("提示特效")]
public TipEffect tipEffect;
[Header("互动特效")]
public InteractEffect interactEffect;
protected override void Awake()
{
base.Awake();
tipEffect.gameObject.SetActive(false);
interactEffect.gameObject.SetActive(false);
}
public void EnableTipEffect(Transform transform)
{
tipEffect.gameObject.SetActive(true);
tipEffect.ChangeEffectPos(transform);
}
public void DisableTipEffect()
{
tipEffect.gameObject.SetActive(false);
}
public void EnableInteractEffect(Vector3 pos)
{
if(interactEffect.gameObject.activeInHierarchy) return;
interactEffect.gameObject.SetActive(true);
interactEffect.StartInteract(pos);
}
public void DisableInteractEffect()
{
interactEffect.EndInteract();
interactEffect.gameObject.SetActive(false);
}
}