public float GetScale() { Random.seed = iSeed; float fSize = Random.Range(fSizeMin, fSizeMax); if (tParent != null) { fSize *= tParent.GetScale(); } return(fSize); }
public void AddLogoToScreen(float fX, float fY) { tLogoImage.tColorPrimary = tPrimary; tLogoImage.tColorSecondary = tSecondary; for (int iLayer = 0; iLayer < LogoImage.MAXLAYERS; ++iLayer) { LogoLayer tLayer = tLogoImage.tLayers[iLayer]; bool bFirst = iLayer == 0; bool bLast = iLayer == LogoImage.MAXLAYERS - 1; FMaskedSprite tSprite = new FMaskedSprite(tLayer.GetImage(), tLayer.GetMask()); tScreen.AddSprite(tSprite); float fWidth = tLogoImage.fWidth * tLayer.GetScale(); tSprite.width = fWidth; tSprite.height = fWidth; float fXOffset = tLogoImage.fWidth * tLayer.GetPosition().x; float fYOffset = tLogoImage.fWidth * tLayer.GetPosition().y; tSprite.SetPosition(fX + fXOffset, fY + fYOffset); tSprite.color = tLogoImage.GetColour(tLayer.eColour); } }