/// <summary> Method used by the ThemeManager when the active variant or selected theme have changed </summary> /// <param name="theme"> Target theme </param> public override void UpdateTarget(ThemeData theme) { if (Event == null) { return; } if (theme == null) { return; } base.UpdateTarget(theme); if (ThemeId == Guid.Empty) { return; } if (PropertyId == Guid.Empty) { return; } if (theme.ActiveVariant == null) { return; } Event.Invoke(theme.ActiveVariant.GetSprite(PropertyId)); }
public virtual void OnEventInvoked(Sprite value) { if (value) { ResponseSprite.Invoke(value); } else { ResponseNull.Invoke(); } }
public void InjectRomance(int romanceValue) { if (romanceValue == 0) { this.noRomance.Invoke(); } else { var resource = lastInjectedData.ressources.FirstOrDefault(r => r.type == ResourceType.Romance); if (romanceValue > 0) { romanceSprite.Invoke(resource.data.goodSprite); romanceColor.Invoke(resource.data.goodColor); this.romanceValue.Invoke(string.Concat("+", romanceValue.ToString())); } else { romanceSprite.Invoke(resource.data.badSprite); romanceColor.Invoke(resource.data.badColor); this.romanceValue.Invoke(romanceValue.ToString()); } } }
public void InjectEpicness(int epicnessValue) { if (epicnessValue == 0) { this.noEpicness.Invoke(); } else { var resource = lastInjectedData.ressources.FirstOrDefault(r => r.type == ResourceType.Epicness); if (epicnessValue > 0) { epicnessSprite.Invoke(resource.data.goodSprite); epicnessColor.Invoke(resource.data.goodColor); this.epicnessValue.Invoke(string.Concat("+", epicnessValue.ToString())); } else { epicnessSprite.Invoke(resource.data.badSprite); epicnessColor.Invoke(resource.data.badColor); this.epicnessValue.Invoke(epicnessValue.ToString()); } } }
public void Fill(AudienceData data) { isInit = true; refData = data; neededEpicness = (int)Random.Range(data.epicnessNeeds.x, data.epicnessNeeds.y); neededRomance = (int)Random.Range(data.romanceNeeds.x, data.romanceNeeds.y); currentEpicness = neededEpicness; currentRomance = neededRomance; if (currentEpicness > 0) { epicnessStringUpdated.Invoke(currentEpicness.ToString()); } if (currentRomance > 0) { romanceStringUpdated.Invoke(currentRomance.ToString()); } //cardSpriteUpdated.Invoke(data.mainSprite);//this.GetComponent<Image>().sprite = data.calmSprite; DebugOver = false; isOverrideControllerFilled.Invoke(data.overrideController); isBackgroundImageFilled.Invoke(data.backgroundSprite); cardSpriteUpdated.Invoke(data.mainSprite); isFilled.Invoke(this); }
public void Inject(CardData cardData) { lastInjectedData = cardData; backgroundSprite.Invoke(cardData.cardSprite); this.cardData.Invoke(cardData); }