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.
 
 
 
 
 
 

60 lines
1.6 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine.Unity;
using UnityEngine.UI;
using TMPro;
public class LevelUpEffect : IVTraceTarget
{
GameObject levelUpSet;
[SerializeField]
SkeletonAnimation levelUpEffectUp;
[SerializeField]
SkeletonAnimation levelUpEffectBottom;
// Start is called before the first frame update
void Start()
{
}
public override void SetCameraTarget(Camera cammain, Camera camui, RectTransform trfpr, Transform trftarget, float foffsety)
{
base.SetCameraTarget(cammain, camui, trfpr, trftarget, foffsety);
levelUpSet = trfSelf.gameObject;
}
public void ShowLevelUp(float ftime)
{
levelUpEffectUp.AnimationState.SetAnimation(0, "animation", false);
levelUpEffectBottom.AnimationState.SetAnimation(0, "animation", false);
CancelInvoke("HideObject");
SetPosition();
gameObject.SetActive(true);
Invoke("HideObject", ftime);
}
public void ShowLevelUp(Transform trftarget, float foffsety, float ftime)
{
levelUpEffectUp.AnimationState.SetAnimation(0, "animation", false);
levelUpEffectBottom.AnimationState.SetAnimation(0, "animation", false);
trfTarget = trftarget;
fOffsetY = foffsety;
CancelInvoke("HideObject");
SetPosition();
gameObject.SetActive(true);
Invoke("HideObject", ftime);
}
public void HideObject()
{
CancelInvoke("HideObject");
gameObject.SetActive(false);
}
}