先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System;
|
|
public interface IFootPrintService
|
|
{
|
|
public EFootPrint FootPrint { get; }
|
|
public void UpdateFootPrint(EFootPrint newState);
|
|
public void UploadData();
|
|
public void LoadData(string data);
|
|
public bool HasFootPrint(EFootPrint state);
|
|
}
|
|
|
|
// ReSharper disable once ClassNeverInstantiated.Global
|
|
public class FootPrintService : IFootPrintService
|
|
{
|
|
private EFootPrint _footPrint;
|
|
public EFootPrint FootPrint => _footPrint;
|
|
public void UpdateFootPrint(EFootPrint newState)
|
|
{
|
|
_footPrint |= newState;
|
|
UploadData();
|
|
}
|
|
|
|
public void UploadData()
|
|
{
|
|
var data = (ulong)_footPrint;
|
|
PlayFabMgr.Instance.UpdateUserDataValue("FootPrint", data.ToString());
|
|
}
|
|
|
|
public void LoadData(string data)
|
|
{
|
|
_footPrint = (EFootPrint) ulong.Parse(data);
|
|
}
|
|
|
|
public bool HasFootPrint(EFootPrint state)
|
|
{
|
|
return (_footPrint & state) == state;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Record Status. Max out at 64th record.
|
|
/// </summary>
|
|
[Flags]
|
|
public enum EFootPrint : int
|
|
{
|
|
HasCommunityGuidancePanelBeenOpened = 1 << 0,
|
|
IsFaceBookRewardClaimed = 1 << 1,
|
|
IsInstagramRewardClaimed = 1 << 2,
|
|
IsDiscordRewardClaimed = 1 << 3,
|
|
IsTiktokRewardClaimed = 1 << 4,
|
|
IsYouTubeRewardClaimed = 1 << 5,
|
|
IsEventCanGuidePoped = 1 << 6,
|
|
IsFaceBookRewardLink = 1 << 7,
|
|
}
|