Пример #1
0
    public IEnumerator End(float duration)
    {
        yield return(new WaitForSeconds(duration));

        MenuUtility.LerpOutFillAmount(ArrowColor, 1f, 0.1f);
        MenuUtility.LerpToTransparent(ArrowColor, 1 / 2f, 0f);
        MenuUtility.LerpToTransparent(ArrowBase, 1f, 0f);
    }
    public void Init(LocatableItem target, Vector3 offset)
    {
        Target = target;

        transform.position += offset;

        Thumbnail.texture = target.Thumbnail;
        Border.color      = target.Color;

        MenuUtility.LerpFromTransparent(Background, 0.5f, 0f);
        MenuUtility.LerpFromTransparent(Thumbnail, 0.5f, 0.2f);
        MenuUtility.LerpFromTransparent(OuterBorder, 0.125f, 0f);
        MenuUtility.LerpFromTransparent(Border, 0.125f, 0.2f);
        MenuUtility.LerpOutFillAmount(OuterBorder, 0.333f, 0.2f);

        StartCoroutine(End());

        AddDirectionIndicator(target);
    }