黄金周期、历史事件
This commit is contained in:
parent
99303c2382
commit
72caab98e5
Binary file not shown.
Binary file not shown.
@ -177,13 +177,15 @@ namespace GameLogic
|
||||
// 更新界面逻辑
|
||||
// 目前固定两百个点赞逻辑。
|
||||
m_tmp_ShiJianValue.text = string.Format("{0}/200", DataGameSceneManager.Instance.m_LiShiShiJianLikeCount);
|
||||
|
||||
|
||||
m_img_JinDu.fillAmount = (float)DataGameSceneManager.Instance.m_LiShiShiJianLikeCount / DataGameSceneManager.Instance.m_LiShiShiJianLikeCountMax;
|
||||
|
||||
// 奖励也是固定死的
|
||||
if (DataGameSceneManager.Instance.m_LiShiShiJianLikeCount >= DataGameSceneManager.Instance.m_LiShiShiJianLikeCountMax)
|
||||
{
|
||||
|
||||
Log.Debug("历史事件成功。。。");
|
||||
|
||||
DataGameSceneManager.Instance.isLiShiShiJian = false; // 重置
|
||||
|
||||
// 触发历史事件条件
|
||||
@ -233,6 +235,7 @@ namespace GameLogic
|
||||
}
|
||||
|
||||
protected override void RegisterEvent()
|
||||
|
||||
{
|
||||
base.RegisterEvent();
|
||||
GameEvent.AddEventListener(EventConts.RestGameBattle, RestGameBattleFunc);
|
||||
@ -256,6 +259,7 @@ namespace GameLogic
|
||||
}
|
||||
|
||||
|
||||
private int m_LishiId = -1;
|
||||
/// <summary>
|
||||
/// 黄金时代结束
|
||||
/// </summary>
|
||||
@ -276,6 +280,55 @@ namespace GameLogic
|
||||
DataGameSceneManager.Instance.isLiShiShiJian = true;
|
||||
|
||||
};
|
||||
|
||||
// 历史事件时间周期
|
||||
if (m_LishiId != -1)
|
||||
{
|
||||
GameModule.Timer.RemoveTimer(m_LishiId);
|
||||
}
|
||||
|
||||
// 历史事件维持时间周期
|
||||
m_LishiId = GameModule.Timer.AddTimer((e) =>
|
||||
{
|
||||
|
||||
Log.Debug("历史事件失败。。。");
|
||||
|
||||
DataGameSceneManager.Instance.isLiShiShiJian = false;
|
||||
|
||||
// 告知关闭历史事件了
|
||||
// 设置用户信息显示
|
||||
DataGameSceneManager.Instance.sjDatas.Sort((a, b) =>
|
||||
{
|
||||
if (a.count > b.count)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// 设置用户信息
|
||||
m_textHuangJinInfo.text = ConfigSystem.Instance.Tables.TbTeamConfig.Get(teamId).LoswerInfo;
|
||||
|
||||
// 设置图片从透明到不透明
|
||||
m_img_HuangJinShiDai.color = new Color(1, 1, 1, 0);
|
||||
m_img_HuangJinShiDai.CrossFadeAlpha(1, 1f, false);
|
||||
|
||||
|
||||
DataGameSceneManager.Instance.sjDatas.Clear(); // 清空数据
|
||||
|
||||
// 等待五秒钟后关闭
|
||||
UniTask.Delay(5000).ContinueWith(() =>
|
||||
{
|
||||
m_img_HuangJinShiDai.CrossFadeAlpha(0, 1f, false);
|
||||
m_img_HuangJinShiDai.gameObject.SetActive(false);
|
||||
|
||||
});
|
||||
|
||||
}, 30);
|
||||
|
||||
}
|
||||
|
||||
private void SwitchTeamIdFunc()
|
||||
|
@ -23,6 +23,7 @@ public sealed partial class TeamConfig : Luban.BeanBase
|
||||
ScoreTargetValue = _buf.ReadInt();
|
||||
OneScoreTargetValue = _buf.ReadInt();
|
||||
VideoName = _buf.ReadString();
|
||||
LoswerInfo = _buf.ReadString();
|
||||
TextInfo = _buf.ReadString();
|
||||
}
|
||||
|
||||
@ -62,6 +63,10 @@ public sealed partial class TeamConfig : Luban.BeanBase
|
||||
/// <summary>
|
||||
/// 描述文字
|
||||
/// </summary>
|
||||
public readonly string LoswerInfo;
|
||||
/// <summary>
|
||||
/// 描述文字
|
||||
/// </summary>
|
||||
public readonly string TextInfo;
|
||||
|
||||
public const int __ID__ = -325757586;
|
||||
@ -81,6 +86,7 @@ public sealed partial class TeamConfig : Luban.BeanBase
|
||||
+ "ScoreTargetValue:" + ScoreTargetValue + ","
|
||||
+ "OneScoreTargetValue:" + OneScoreTargetValue + ","
|
||||
+ "VideoName:" + VideoName + ","
|
||||
+ "LoswerInfo:" + LoswerInfo + ","
|
||||
+ "TextInfo:" + TextInfo + ","
|
||||
+ "}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user