diff --git a/Configs/GameConfig/Datas/GiftConfig.xlsx b/Configs/GameConfig/Datas/GiftConfig.xlsx index 323e973b..27450bb0 100644 Binary files a/Configs/GameConfig/Datas/GiftConfig.xlsx and b/Configs/GameConfig/Datas/GiftConfig.xlsx differ diff --git a/UnityProject/Assets/AssetRaw/Configs/bytes/giftconfig_tbgiftconfig.bytes b/UnityProject/Assets/AssetRaw/Configs/bytes/giftconfig_tbgiftconfig.bytes index 08eb7cd7..8f4b7d0b 100644 Binary files a/UnityProject/Assets/AssetRaw/Configs/bytes/giftconfig_tbgiftconfig.bytes and b/UnityProject/Assets/AssetRaw/Configs/bytes/giftconfig_tbgiftconfig.bytes differ diff --git a/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ01.prefab b/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ01.prefab index f89e4007..5f71ae99 100644 --- a/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ01.prefab +++ b/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ01.prefab @@ -4785,7 +4785,7 @@ ParticleSystemRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1956437214252120661} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 @@ -9646,7 +9646,7 @@ ParticleSystemRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7137308602897563509} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 @@ -9724,6 +9724,8 @@ GameObject: - component: {fileID: 6543596073789926481} - component: {fileID: 6380066754472480999} - component: {fileID: 6474560862264618114} + - component: {fileID: 2946505988616172983} + - component: {fileID: 1911809151473155101} m_Layer: 5 m_Name: TTQ01 m_TagString: Untagged @@ -9731,22 +9733,26 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &6543596073789926481 -Transform: +--- !u!224 &6543596073789926481 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8962725566398883512} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 1 + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 8307890733772371341} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!198 &6380066754472480999 ParticleSystem: m_ObjectHideFlags: 0 @@ -14544,3 +14550,49 @@ ParticleSystemRenderer: m_MeshWeighting2: 1 m_MeshWeighting3: 1 m_MaskInteraction: 0 +--- !u!222 &2946505988616172983 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8962725566398883512} + m_CullTransparentMesh: 1 +--- !u!114 &1911809151473155101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8962725566398883512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 16f0b0b6d0b7542bfbd20a3e05b04ff1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_IsTrail: 0 + m_IgnoreCanvasScaler: 0 + m_AbsoluteMode: 0 + m_Scale3D: {x: 1, y: 1, z: 1} + m_AnimatableProperties: [] + m_Particles: + - {fileID: 6380066754472480999} + - {fileID: 8523464402205492189} + - {fileID: 5007804999313055349} + m_MeshSharing: 0 + m_GroupId: 0 + m_GroupMaxId: 0 + m_PositionMode: 0 + m_AutoScaling: 0 + m_AutoScalingMode: 2 + m_UseCustomView: 0 + m_CustomViewSize: 10 + m_TimeScaleMultiplier: 1 diff --git a/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ02.prefab b/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ02.prefab index 0d6cf973..b6f24103 100644 --- a/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ02.prefab +++ b/UnityProject/Assets/AssetRaw/Effects/Liwu/TTQ02.prefab @@ -4822,7 +4822,7 @@ ParticleSystemRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 633300643035993301} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 @@ -9731,6 +9731,8 @@ GameObject: - component: {fileID: 6900814036164491894} - component: {fileID: 4357348048372322508} - component: {fileID: 4803257004225807458} + - component: {fileID: 2839976173353748248} + - component: {fileID: 7741089732566191486} m_Layer: 5 m_Name: TTQ02 m_TagString: Untagged @@ -9738,22 +9740,26 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &6900814036164491894 -Transform: +--- !u!224 &6900814036164491894 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7328453386231896862} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 20, y: 20, z: 20} - m_ConstrainProportionsScale: 1 + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7452702447235031992} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!198 &4357348048372322508 ParticleSystem: m_ObjectHideFlags: 0 @@ -14551,6 +14557,53 @@ ParticleSystemRenderer: m_MeshWeighting2: 1 m_MeshWeighting3: 1 m_MaskInteraction: 0 +--- !u!222 &2839976173353748248 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7328453386231896862} + m_CullTransparentMesh: 1 +--- !u!114 &7741089732566191486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7328453386231896862} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 16f0b0b6d0b7542bfbd20a3e05b04ff1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_IsTrail: 0 + m_IgnoreCanvasScaler: 0 + m_AbsoluteMode: 0 + m_Scale3D: {x: 10, y: 10, z: 10} + m_AnimatableProperties: [] + m_Particles: + - {fileID: 4357348048372322508} + - {fileID: 2270257726922697940} + - {fileID: 583233830613673150} + - {fileID: 7707763690384297097} + m_MeshSharing: 0 + m_GroupId: 0 + m_GroupMaxId: 0 + m_PositionMode: 0 + m_AutoScaling: 0 + m_AutoScalingMode: 2 + m_UseCustomView: 0 + m_CustomViewSize: 10 + m_TimeScaleMultiplier: 1 --- !u!1 &8270850574774468148 GameObject: m_ObjectHideFlags: 0 @@ -19315,7 +19368,7 @@ ParticleSystemRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8270850574774468148} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index aabe1807..5e5fd16b 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -161,18 +161,16 @@ namespace GameLogic else if (buff.m_Id == 7) { // 全屏特效特殊处理 - + if (buff.addPower == 0) + { + // 加载无敌特效 + LoadEffectGo(giftConfig, buff); + } } else { - var eGo = GameModule.Resource.LoadGameObject(giftConfig.EffectName); - eGo.transform.SetParent(m_rectCar.transform); - eGo.transform.localPosition = Vector3.zero; - eGo.transform.localScale = Vector3.one; - eGo.transform.GetComponent().scale = giftConfig.EffectScale; - buff.m_EffectGo = eGo; - - Log.Debug("生成Buff特效:" + giftConfig.EffectName); + // 加载常规特效 + LoadEffectGo(giftConfig, buff); } @@ -193,6 +191,18 @@ namespace GameLogic } + private void LoadEffectGo(GiftConfig giftConfig, Buff buff) + { + var eGo = GameModule.Resource.LoadGameObject(giftConfig.EffectName); + eGo.transform.SetParent(m_rectCar.transform); + eGo.transform.localPosition = Vector3.zero; + eGo.transform.localScale = Vector3.one; + eGo.transform.GetComponent().scale = giftConfig.EffectScale; + buff.m_EffectGo = eGo; + + Log.Debug("生成Buff特效:" + giftConfig.EffectName); + } + /// /// 计算百分比大小值 /// diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/Buff/Buff.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/Buff/Buff.cs index d6c5f4a7..ece269d3 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/Buff/Buff.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/Buff/Buff.cs @@ -19,8 +19,8 @@ public class Buff m_Id = id; // 记录一下,特殊Buff,正常计时。非特殊Buff,在Actor中计时 m_CraeteTimer = id == EventConts.isZoneTimerBuffId ? Time.time : 0; - isZoneTimer = id == EventConts.isZoneTimerBuffId; - isAllPower = id == EventConts.isAllPowerBuffId; + //isZoneTimer = id == EventConts.isZoneTimerBuffId; + //isAllPower = id == EventConts.isAllPowerBuffId; addPower = value; if (isZoneTimer) { diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs index ac02beb3..1685dd8a 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs @@ -63,7 +63,7 @@ namespace GameLogic public const string PlayerUpdateLv = "PlayerUpdateLv"; public const string AddPlayer = "AddPlayer"; public const string AddGiftMessage = "AddGiftMessage"; - + public const string TtqEffectCreate = "TtqEffectCreate"; #endregion diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 67f8e7e7..fe14c607 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -451,16 +451,28 @@ namespace GameLogic return; } - //Buff m_Buff = new Buff(); - //m_Buff.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num); - //actor.AddBuff(m_Buff, unitPlayerData, giftConfig); + // 添加无敌护罩 + Buff m_Buff = new Buff(); + m_Buff.OnInit(giftConfig.Id, 0, giftConfig.TimerLen * num, giftConfig.AddGiftScore, num); + m_Buff.isZoneTimer = true; + actor.AddBuff(m_Buff, unitPlayerData, giftConfig); // 给其他赛道天降流星雨 - //GameModule.Timer.AddTimer((e) => - //{ - // var m_Ego = GameModule.Resource.LoadGameObject(giftConfig.EffectName); - //}, giftConfig.TimerLen); + foreach (var item in m_DicTeamList) + { + if (item.Value != actor) + { + // 添加减速Buff + Buff m_Buff1 = new Buff(); + m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num); + item.Value.AddBuff(m_Buff1, unitPlayerData, giftConfig); + } + } + + + // 告知UI,创建全屏特效 + GameEvent.Send(EventConts.TtqEffectCreate, giftConfig); } /// /// 能量电池礼物效果 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs index cbf653c0..a9e0a8cc 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs @@ -6,6 +6,7 @@ using GameConfig.giftConfig; using System.Threading.Tasks; using Cysharp.Threading.Tasks; using TMPro; +using Coffee.UIExtensions; namespace GameLogic { @@ -125,6 +126,7 @@ namespace GameLogic { base.RegisterEvent(); GameEvent.AddEventListener(EventConts.RestGameBattle, RestGameBattleFunc); + GameEvent.AddEventListener(EventConts.TtqEffectCreate, TtqEffectCreateFunc); GameEvent.AddEventListener(EventConts.AddPlayer, AddPlayerFunc); GameEvent.AddEventListener(EventConts.AddGiftMessage, AddGiftMessageFunc); } @@ -134,6 +136,7 @@ namespace GameLogic { base.OnDestroy(); GameEvent.RemoveEventListener(EventConts.RestGameBattle, RestGameBattleFunc); + GameEvent.RemoveEventListener(EventConts.TtqEffectCreate, TtqEffectCreateFunc); GameEvent.RemoveEventListener(EventConts.AddPlayer, AddPlayerFunc); GameEvent.RemoveEventListener(EventConts.AddGiftMessage, AddGiftMessageFunc); } @@ -163,6 +166,21 @@ namespace GameLogic //topTipsTime.GetComponent().OnInit(unitPlayerData, null, 0); } + /// + /// 甜甜圈特效 + /// + private void TtqEffectCreateFunc(GiftConfig giftConfig) + { + GameModule.Timer.AddTimer((e) => + { + var m_Ego = GameModule.Resource.LoadGameObject("TTQ01"); + m_Ego.transform.SetParent(this.transform); + m_Ego.transform.localPosition = Vector3.zero; + m_Ego.transform.localScale = Vector3.one; + m_Ego.transform.GetComponent().scale = 1; + }, giftConfig.TimerLen); + } + private async void AddGiftMessageFunc(UnitPlayerData unitPlayerData, GiftConfig giftConfig, int num) { //var giftItem = GameObject.Instantiate(m_rect_GiftPanel.transform.GetChild(0));