1
This commit is contained in:
parent
b2bdf45a5d
commit
715767db4a
@ -9,6 +9,7 @@ using System;
|
||||
using DG.Tweening;
|
||||
using Coffee.UIExtensions;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
@ -566,7 +567,7 @@ namespace GameLogic
|
||||
/// <param name="giftConfig"></param>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="unitPlayerData"></param>
|
||||
private void TtqGiftFunc(GiftConfig giftConfig, int num, UnitPlayerData unitPlayerData)
|
||||
private async Task TtqGiftFunc(GiftConfig giftConfig, int num, UnitPlayerData unitPlayerData)
|
||||
{
|
||||
// 给自己赛道添加无敌Buff
|
||||
var actor = GetTeamActor(unitPlayerData.teamId);
|
||||
@ -588,6 +589,7 @@ namespace GameLogic
|
||||
{
|
||||
if (item.Value != actor)
|
||||
{
|
||||
await UniTask.Delay(500);
|
||||
// 添加减速Buff
|
||||
Buff m_Buff1 = new Buff();
|
||||
m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num);
|
||||
|
@ -296,13 +296,23 @@ namespace GameLogic
|
||||
|
||||
}
|
||||
|
||||
|
||||
public GameObject m_TestEgo = null;
|
||||
/// <summary>
|
||||
/// 甜甜圈特效
|
||||
/// </summary>
|
||||
private async void TtqEffectCreateFunc(GiftConfig giftConfig)
|
||||
{
|
||||
|
||||
// 判断场景是否存在这个资源
|
||||
if (m_TestEgo != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var m_Ego = GameModule.Resource.LoadGameObject("TTQ01");
|
||||
m_TestEgo = m_Ego;
|
||||
m_Ego.transform.SetParent(this.transform);
|
||||
m_Ego.transform.localPosition = Vector3.zero;
|
||||
m_Ego.transform.localScale = Vector3.one;
|
||||
@ -310,6 +320,9 @@ namespace GameLogic
|
||||
// 设置时间消失
|
||||
await UniTask.Delay(giftConfig.TimerLen * 1000);
|
||||
GameObject.Destroy(m_Ego);
|
||||
m_TestEgo = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async void AddGiftMessageFunc(UnitPlayerData unitPlayerData, GiftConfig giftConfig, int num)
|
||||
|
Loading…
x
Reference in New Issue
Block a user