Danro/Assets/Scripts/Managers/PaymentManager.cs
Danil Iarosh 98d5285b46 feat(logging): add advanced logging example with file output
- Created AdvancedLoggingExample class demonstrating composite and file loggers
- Implemented multi-file logging setup with separate error and full logs
- Added game event and performance logging methods
- Included key input handling for log operations (flush, clear)
- Setup proper resource disposal on application quit
2025-11-07 14:12:50 +03:00

39 lines
929 B
C#

using UnityEngine;
namespace RR.Common.Managers
{
public class PaymentManager : MonoBehaviour
{
public static PaymentManager Instance { get; private set; }
public int CreditsCount;
public void Initialize()
{
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
DontDestroyOnLoad(gameObject);
CreditsCount = 0;
ComWrapper.OnCreditAdded.AddListener(UpdateCredits);
}
private void UpdateCredits(int newCreditsCount)
{
CreditsCount = newCreditsCount;
}
// Если не инициализируется в GameManager, инициализировать тут
// private void Awake()
// {
// Initialize();
// }
}
}