void UpdateSlot(Image2 image) { if (image != null) { image.color = ComputeColor(spriteSlot.color); } }
private void UpdateSpriteSize(Vector2 originPosition, Image2 image, Rect spriteRect) { float posX = originPosition.x * scaleRatio.x; float posY = originPosition.y * scaleRatio.y; MadTransform.SetLocalPosition(image.rectTransform, new Vector3(posX, posY)); SetSize(image.rectTransform, new Vector2(spriteRect.width * scaleRatio.x, spriteRect.height * scaleRatio.y)); }
void SetIconVisible(Image2 image, float scale = 1) { image.color = ComputeColor(spriteIcon.color); image.fillValue = 1; MadTransform.SetLocalScale(image.transform, new Vector3(scale, scale, scale)); image.enabled = true; }
private void BuildBar() { imageBar = CreateChild<Image2>("bar"); imageBar.sprite = spriteBar; imageBar.material = spriteBarMaterial; imageBar.SetNativeSize(); imageBar.growDirection = growDirection; imageBar.readable = true; imageBar.uvTiling = barImageRepeater; // Cipsoft change }
private void BuildEffectTilled() { effectTilledImageBarMask = CreateChild<Image2>("bar_mask"); effectTilledImageBarMask.sprite = spriteBar; effectTilledImageBarMask.SetNativeSize(); effectTilledImageBarMask.growDirection = growDirection; effectTilledImageBarMask.readable = true; var mask = effectTilledImageBarMask.gameObject.AddComponent<Mask>(); mask.showMaskGraphic = false; effectTilledImageTiles = CreateChild<Image2>("tiles", effectTilledImageBarMask.transform); effectTilledImageTiles.sprite = effectTiledSprite; }
private void BuildBurnBar() { imageBurn = CreateChild<Image2>("burn_bar"); if (effectBurnSprite.sprite) { imageBurn.sprite = effectBurnSprite.sprite; } else { imageBurn.sprite = spriteBar; } imageBurn.material = effectBurnSprite.material; imageBurn.SetNativeSize(); imageBurn.growDirection = growDirection; imageBurn.uvTiling = barImageRepeater; // Cipsoft change }
private void BuildBar() { imageBar = CreateChild<Image2>("bar"); imageBar.sprite = spriteBar; imageBar.SetNativeSize(); imageBar.growDirection = growDirection; imageBar.readable = true; }
private void BuildBurnBar() { imageBurn = CreateChild<Image2>("burn_bar"); imageBurn.sprite = imageBurn.sprite ?? spriteBar; imageBurn.SetNativeSize(); imageBurn.growDirection = growDirection; }
void SetIconInvisible(Image2 image) { image.enabled = false; }
private void BuildBar() { barImage = CreateChild<Image2>("bar"); }
private void BuildBurnBar() { imageBurn = CreateChild<Image2>("burn_bar"); imageBurn.sprite = imageBurn.sprite ?? spriteBar; imageBurn.SetNativeSize(); imageBurn.growDirection = growDirection; imageBurn.uvTiling = barImageRepeater; // Cipsoft change }
private void BuildBar() { imageBar = CreateChild<Image2>("bar"); imageBar.sprite = spriteBar; imageBar.SetNativeSize(); imageBar.growDirection = growDirection; imageBar.readable = true; imageBar.uvTiling = barImageRepeater; // Cipsoft change }