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.
 
 
 
 
 
 

42 lines
927 B

using UnityEngine;
public class MateSkillCutSceneView : View
{
[SerializeField] ExtendImage mate2DImg;
[SerializeField] Animator cutSceneAnim;
private void Start()
{
Hide();
}
private void LateUpdate()
{
if (cutSceneAnim.IsComplete(GlobalAnimatorProperty._playStateNameHash))
Hide();
}
public override void Show()
{
ResetPosition();
viewState = ViewState.Shown;
gameObject.SetActive(true);
if(cutSceneAnim.isActiveAndEnabled)
cutSceneAnim.Play(GlobalAnimatorProperty._playStateNameHash, 0, 0);
}
public override void Hide()
{
gameObject.SetActive(false);
viewState = ViewState.Hidden;
}
public void SetMate(IVMate mate)
{
if(mate == null)
mate2DImg.ReleaseAsyncImage();
else
mate2DImg.SetImageAsync(mate.Data.Img2DPath);
}
}