Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        Item item;

        levelScrollManager = GetComponent <ItemScrollManager>();
        container          = GetComponent <ItemSpawner>();
        snapManager        = GetComponent <SnapManager>();
        binder             = GetComponentInParent <UIDataBinder>();
    }
    private void Start()
    {
        binder = GetComponentInParent <UIDataBinder>();

        manager = GetComponent <ItemScrollManager>();
        snap    = GetComponent <SnapManager>();

        ControlState();
    }
Example #3
0
    private void Start()
    {
        //Get Component Fields From LevelScrollManager
        ItemScrollManager scrollManager = GetComponent <ItemScrollManager>();

        container = scrollManager.GetItemContainer();
        points    = scrollManager.GetPointManager();

        //Get items in container
        items             = scrollManager.GetItems();
        firstItemPosition = -1f * items[0].Rect.position.x;
        lastItemPosition  = -1f * items[items.Length - 1].Rect.anchoredPosition.x;

        //initialize distances & positions
        distances = new float[items.Length];
        positions = new float[items.Length];

        //Open ScrollRect.inertia
        levelsScroll.inertia          = true;
        levelsScroll.decelerationRate = deceleration;
    }
Example #4
0
    private void Start()
    {
        uiBinder = GetComponentInParent <UIDataBinder>();

        scrollManager = GetComponent <ItemScrollManager>();
        snapManager   = GetComponent <SnapManager>();
        items         = scrollManager.GetItems();

        if (actionType == ActionType.UI)
        {
            newMapInfo.SetActive(false);
            if (PlayerData.instance.GetPlayerLevelUp() != 0)
            {
                newMapInfo.SetActive(true);
                newMapInfo.GetComponent <NewMapInfoAnimController>().Animate();
            }
        }

        if (actionType == ActionType.Shop)
        {
            shopBinder = GetComponentInParent <ShopDataBinder>();
        }
    }
Example #5
0
 private void Start()
 {
     binder        = GetComponentInParent <ShopDataBinder>();
     scrollManager = GetComponent <ItemScrollManager>();
     snapManager   = GetComponent <SnapManager>();
 }