private void Start() { _screenBounds = GameManager.GetScreenBounds; var itemSize = ListItem.Length; int randomItem = Random.Range(0, itemSize - 1); _dispenserItem = ListItem[randomItem]; }
public async Task AddItemToDispenserAsync(Guid itemId, Guid dispenserId, CancellationToken cancellationToken = default) { var dispenserItem = new DispenserItem { ItemId = itemId, DispenserId = dispenserId }; await toolShedContext.DispenserItemSet .AddAsync(dispenserItem); await toolShedContext.SaveChangesAsync(cancellationToken); }
public async Task RemoveItemFromDispensery(DispenserItem dispenserTool, CancellationToken cancellationToken = default) { toolShedContext.DispenserItemSet .Remove(dispenserTool); await toolShedContext.SaveChangesAsync(cancellationToken); }
public DispenserItemRepositoryTests() { dispenserItemRepository = GetInMemoryDispenserItemRepository(); dispenserItem = CreateDispenserItem(); }
public void Setup(ref DispenserItem dispenserItem) { _spriteRenderer.sprite = dispenserItem.ItemSprite; ItemType = dispenserItem.Type; }