private bool ChangeMaskPaintType(CustomYokaiMask yokaiMask) { YokaiMaskPaint newColor; newColor = MixMaskPaint.MixPaint(yokaiMask.Paint, _maskPainterType); if (newColor != yokaiMask.Paint && !_supplier._isOccupied) { _supplier.PaintMask(yokaiMask, newColor); return(true); } return(false); }
private IEnumerator Filling(CustomYokaiMask yokaiMask, YokaiMaskPaint newPaint) { _isOccupied = true; //TODO: Start animation yield return(new WaitForSeconds(_fillingTime)); yokaiMask._potionUpdateSprite.ChangeSpriteColor((PotionColor)yokaiMask.Paint, (PotionColor)newPaint); yokaiMask.Paint = newPaint; yokaiMask.ResetPositionToSlot(); DecrementCurrentCapacity(); _isOccupied = false; }
/// <summary> /// Mix paint and change 'Paint' type /// </summary> /// <param name="Paint"></param> private bool MixPaint(CustomYokaiMask yokaiMask) { bool changedColor = false; if (_supplier.CurrentCapacity > 0) { changedColor = ChangeMaskPaintType(yokaiMask); } if (changedColor) { yokaiMask.Complexity += 1; } return(changedColor); }