Exemplo n.º 1
0
    public void PrepareCurrentFlagCheck()
    {
        index = shopBinder.GetFlagIcon();
        Item flag = items[index];
        CheckAnimationController flagAnim = flag.GetComponent <CheckAnimationController>();

        flagAnim.CheckItem();
        flagIconVisualController.SetVisual(flag.Data.flagData.basicData.icon);
    }
Exemplo n.º 2
0
    //Sets Container Position with PlayerData Stats
    private void SetContainerPosition()
    {
        float position = -1;

        position *= spawner.ItemDistance;
        switch (type)
        {
        case ItemType.Map:
            position *= GetComponentInParent <UIDataBinder>().GetMapIndex();
            break;

        case ItemType.Body:
            position *= GetComponentInParent <ShopDataBinder>().GetBodyIndex();
            break;

        case ItemType.Extra:
            switch (extraType)
            {
            case ExtraItemType.Top:
                position *= GetComponentInParent <ShopDataBinder>().GetTopIndex();
                break;

            case ExtraItemType.Front:
                position *= GetComponentInParent <ShopDataBinder>().GetFrontIndex();
                break;

            case ExtraItemType.Down:
                position *= GetComponentInParent <ShopDataBinder>().GetDownIndex();
                break;

            default:
                position *= 0f;
                break;
            }
            break;

        case ItemType.Special:
            position *= GetComponentInParent <ShopDataBinder>().GetSpecialIndex();
            break;

        case ItemType.Flag:
            ShopDataBinder shopBinder = GetComponentInParent <ShopDataBinder>();
            position *= shopBinder.GetFlagIcon();
            break;

        default:
            position *= 0f;
            break;
        }

        itemContainer.anchoredPosition = new Vector2(position, 0f);
    }