Make a generic booster pack giver
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -5,6 +5,7 @@ using Core;
|
||||
using Core.Lifecycle;
|
||||
using UnityEngine;
|
||||
using AppleHills.Core.Settings;
|
||||
using Core.Settings;
|
||||
|
||||
namespace Minigames.FortFight.Fort
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user