Пример #1
0
    private void Start()
    {
        shopBinder = GetComponentInParent <ShopDataBinder>();

        string tempFramePath = specialFramePath + " " + shopBinder.GetSpecialIndex().ToString();

        Sprite[] frames = ItemSpawner.LoadSprites(tempFramePath);

        if (frames.Length != 0)
        {
            specialFrameVisual_1.SetVisual(frames[0]);
            specialFrameVisual_2.SetVisual(frames[1]);
            specialFrameVisual_3.SetVisual(frames[2]);
        }
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        shopBinder = GetComponentInParent <ShopDataBinder>();

        Sprite[] sprites = ItemSpawner.LoadSprites(topPath);
        topVisual.SetVisual(sprites[shopBinder.GetTopIndex()]);
        Debug.Log("Top : " + shopBinder.GetTopIndex());

        sprites = ItemSpawner.LoadSprites(frontPath);
        frontVisual.SetVisual(sprites[shopBinder.GetFrontIndex()]);

        sprites = ItemSpawner.LoadSprites(downPath);
        downVisual.SetVisual(sprites[shopBinder.GetDownIndex()]);
        Debug.Log("Down : " + shopBinder.GetDownIndex());

        sprites = null;

        GC.Collect();
    }