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(); }
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); }