mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-11 15:24:02 +08:00
38 lines
795 B
C#
38 lines
795 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Vision.Recognition;
|
|
|
|
namespace BetterGenshinImpact.GameTask
|
|
{
|
|
/// <summary>
|
|
/// 任务上下文
|
|
/// </summary>
|
|
public class TaskContext
|
|
{
|
|
|
|
private static TaskContext? _uniqueInstance;
|
|
private static readonly object Locker = new();
|
|
|
|
private TaskContext()
|
|
{
|
|
}
|
|
|
|
public static TaskContext Instance()
|
|
{
|
|
if (_uniqueInstance == null)
|
|
{
|
|
lock (Locker)
|
|
{
|
|
_uniqueInstance ??= new TaskContext();
|
|
}
|
|
}
|
|
return _uniqueInstance;
|
|
}
|
|
|
|
public IntPtr GameHandle { get; set; }
|
|
}
|
|
}
|