public VendingMachine(int startingCost, VendingType vendingType, Rectangle displayRectangle, Texture2D Texture, float depth) { sourceRect = Texture.Bounds; displayLocation = displayRectangle.Location.ToVector2(); collider = displayRectangle; texture = Texture; drawDepth = depth; type = vendingType; }
public Transform VendingPosition(VendingType vendingType) { _vendingTransform = null; switch (vendingType) { case VendingType.Coffee: _vendingTransform = _coffeeVendingPoint; break; case VendingType.Milk: _vendingTransform = _milkVendingPoint; break; case VendingType.Fish: _vendingTransform = _fishVendingPoint; break; } return(_vendingTransform); }