Ejemplo n.º 1
0
    public void Init(LocatableItem target, float duration = 15f)
    {
        Target = target;

        ArrowColor.color = target.Color;

        MenuUtility.LerpFromTransparent(ArrowBase, 1 / 4f, 0f);
        MenuUtility.LerpFromTransparent(ArrowColor, 1 / 2f, 0.3f);

        MenuUtility.LerpInFillAmount(ArrowColor, 1 / 2f, 0f);

        Path.Init(Target, duration, 0.4f);

        StartCoroutine(End(duration));
    }
    public IEnumerator End()
    {
        yield return(new WaitForSeconds(LocatorArrowDuration));

        MenuUtility.LerpInFillAmount(OuterBorder, 1 / 3f, 0f);
        MenuUtility.LerpToTransparent(Thumbnail, 1 / 2f, 0.4f);
        MenuUtility.LerpToTransparent(Border, 1 / 32f, 0.5f);
        MenuUtility.LerpToTransparent(OuterBorder, 1 / 8f, 0.5f);
        MenuUtility.LerpToTransparent(Background, 1 / 8f, 0.6f);

        while (LeanTween.isTweening(Background.gameObject))
        {
            yield return(null);
        }

        yield return(new WaitForEndOfFrame());

        Destroy(gameObject);
    }