Make a generic booster pack giver

This commit is contained in:
Michal Pikulski
2025-12-15 11:59:40 +01:00
parent e2b74b1ea5
commit bb332933ec
64 changed files with 1228 additions and 312 deletions

View File

@@ -1,6 +1,7 @@
using System;
using Core;
using Core.Lifecycle;
using Core.Settings;
using UnityEngine;
using Minigames.FortFight.Data;
@@ -70,14 +71,14 @@ namespace Minigames.FortFight.Fort
private bool isDestroyed = false;
// Cached settings
private AppleHills.Core.Settings.IFortFightSettings _cachedSettings;
private AppleHills.Core.Settings.IFortFightSettings CachedSettings
private IFortFightSettings _cachedSettings;
private IFortFightSettings CachedSettings
{
get
{
if (_cachedSettings == null)
{
_cachedSettings = GameManager.GetSettingsObject<AppleHills.Core.Settings.IFortFightSettings>();
_cachedSettings = GameManager.GetSettingsObject<IFortFightSettings>();
}
return _cachedSettings;
}
@@ -210,7 +211,7 @@ namespace Minigames.FortFight.Fort
{
if (spriteRenderer == null) return;
var settings = GameManager.GetSettingsObject<AppleHills.Core.Settings.IFortFightSettings>();
var settings = GameManager.GetSettingsObject<IFortFightSettings>();
Color targetColor = settings?.DamageColorTint ?? new Color(0.5f, 0.5f, 0.5f);
// Darken sprite based on damage

View File

@@ -5,6 +5,7 @@ using Core;
using Core.Lifecycle;
using UnityEngine;
using AppleHills.Core.Settings;
using Core.Settings;
namespace Minigames.FortFight.Fort
{