From 63e96281eb4fc2d9a31189ff765b2be37b77b24d Mon Sep 17 00:00:00 2001 From: "DESKTOP-DDTRVOR\\asus" <1162187704@qq.com> Date: Mon, 23 Dec 2024 16:16:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=BF=E5=91=8A=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Blacksmith/Assets/Scenes/SampleScene.unity | 44 ++++++++++++++++++++++ Blacksmith/Assets/Script/AdMgr.cs | 2 +- Blacksmith/Assets/Script/UI/ADSystem.cs | 5 ++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Blacksmith/Assets/Scenes/SampleScene.unity b/Blacksmith/Assets/Scenes/SampleScene.unity index 05998566..b93714c9 100644 --- a/Blacksmith/Assets/Scenes/SampleScene.unity +++ b/Blacksmith/Assets/Scenes/SampleScene.unity @@ -922,6 +922,14 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 650189468646652440, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.0000032498758 + objectReference: {fileID: 0} + - target: {fileID: 1532811897321479711, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.0000032498758 + objectReference: {fileID: 0} - target: {fileID: 2687063965730892539, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -930,6 +938,14 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2703744668847977621, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.x + value: 360.00003 + objectReference: {fileID: 0} + - target: {fileID: 2703744668847977621, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.0000118310445 + objectReference: {fileID: 0} - target: {fileID: 3005541637376198884, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -950,6 +966,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3924915755643395529, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.00001183105 + objectReference: {fileID: 0} - target: {fileID: 4086530264551283400, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_AnchorMax.x value: 0 @@ -958,6 +978,14 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 4576839497981118481, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -1.4701469e-12 + objectReference: {fileID: 0} + - target: {fileID: 4743637259142969288, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.000003553884 + objectReference: {fileID: 0} - target: {fileID: 4892172892484661290, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_AnchorMax.x value: 0 @@ -970,6 +998,14 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 8630107263903414318, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.x + value: 359.99997 + objectReference: {fileID: 0} + - target: {fileID: 8630107263903414318, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.000010355754 + objectReference: {fileID: 0} - target: {fileID: 8734534549119924968, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_AnchorMax.x value: 0 @@ -982,6 +1018,14 @@ PrefabInstance: propertyPath: m_Name value: Canvas objectReference: {fileID: 0} + - target: {fileID: 8849191488238675942, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.x + value: 2534.0264 + objectReference: {fileID: 0} + - target: {fileID: 8849191488238675942, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.000037788843 + objectReference: {fileID: 0} - target: {fileID: 9144618406897127126, guid: 0e52b314be6e069439c3bb54fb42807e, type: 3} propertyPath: m_Pivot.x value: 0 diff --git a/Blacksmith/Assets/Script/AdMgr.cs b/Blacksmith/Assets/Script/AdMgr.cs index f270fb63..ab4bf826 100644 --- a/Blacksmith/Assets/Script/AdMgr.cs +++ b/Blacksmith/Assets/Script/AdMgr.cs @@ -36,7 +36,7 @@ public class AdMgr : MonoBehaviour /// private void Init() { - string videoAdId = "8k6krp0rjl87k356al"; //激励视频广告id + string videoAdId = "52pn2m40l18b0c53hi"; //激励视频广告id adInstance = TT.CreateRewardedVideoAd( videoAdId, (isClose, closeCode) => { diff --git a/Blacksmith/Assets/Script/UI/ADSystem.cs b/Blacksmith/Assets/Script/UI/ADSystem.cs index fe4c6a59..dea84062 100644 --- a/Blacksmith/Assets/Script/UI/ADSystem.cs +++ b/Blacksmith/Assets/Script/UI/ADSystem.cs @@ -26,6 +26,9 @@ public class ADSystem public void PlayAd(Action action) { - action?.Invoke(); + AdMgr.Instance.ShowAd((a) => + { + action?.Invoke(); + }); } }