예제 #1
0
    public override void Init(BasicAtractionData data)
    {
        inventory           = GameManager.Instance.GetUserInventory();
        gameAsset           = GameManager.Instance.GetGameData();
        _recreationAreaData = (RecreationAreaData)data;
        guid             = data.guid;
        _userProductData = inventory.GetUserProductData(guid);

        if (_userProductData == null || _userProductData.count == 0)
        {
            _recreationAreaData.state = ItemState.LOCKED; //TODO - remove hardcodation
        }
        else
        {
            _recreationAreaData.state = ItemState.IDLE; //TODO - remove hardcodation
        }
        InitUIElements();
        CheckBuyBtnState();
    }
예제 #2
0
    public override void Init(BasicAtractionData data)
    {
        inventory            = GameManager.Instance.GetUserInventory();
        gameAsset            = GameManager.Instance.GetGameData();
        _foodAndBeverageData = (FoodAndBeverageData)data;
        guid             = data.guid;
        _userProductData = inventory.GetUserProductData(guid);

        if (_userProductData == null || _userProductData.count == 0)
        {
            _foodAndBeverageData.state = ItemState.LOCKED; //TODO - remove hardcodation
        }
        else
        {
            _foodAndBeverageData.state = ItemState.IDLE; //TODO - remove hardcodation
        }
        InitUIElements();
        CheckBuyBtnState();

        fillAnimation.Init(fillImage, _foodAndBeverageData.fillTimeSeconds, OnAnimComplete);
    }
예제 #3
0
 public void Start()
 {
     userInventory = GameManager.Instance.GetUserInventory();
     gameDataAsset = GameManager.Instance.GetGameData();
     InitCurrencies();
 }