Quellcode durchsuchen

few missing namespaces, added text for results screen (clock of the end)

mbunch_kascope vor 2 Jahren
Ursprung
Commit
55648a724c

+ 0 - 1
Assets/CardEffect/BT17/Black/Armageddemon_BT17_060.cs

@@ -1,6 +1,5 @@
 using System.Collections;
 using System.Collections.Generic;
-using static UnityEditor.PlayerSettings;
 using System.Linq;
 
 namespace DCGO.CardEffects.BT17

+ 4 - 4
Assets/CardEffect/BT17/Black/ClockoftheEnd_BT17_100.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using System;
 using System.Linq;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT17
 {
     public class ClockoftheEnd_BT17_100 : CEntity_Effect
     {
@@ -103,7 +103,7 @@ namespace DCGO.CardEffects
 
                 if (CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsClockofTheEnd) >= 4)
                 {
-                    GManager.instance.turnStateMachine.EndGame(card.Owner, false);
+                    GManager.instance.turnStateMachine.EndGame(card.Owner, false, "Clock of the End");
                 }
             }
             #endregion
@@ -224,9 +224,9 @@ namespace DCGO.CardEffects
             if (timing == EffectTiming.OnEndTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Return 1 digivolution card to play a Digimon from digivolution cards", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Place 1 [Clock of the End] from digivolution cards", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-                activateClass.SetHashString("PlayDigimon_BT10_066");
+                activateClass.SetHashString("PlayCard_BT10_066");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 1 - 1
Assets/CardEffect/BT17/Black/Locomon_BT17_056.cs

@@ -1,7 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT17
 {
     public class Locomon_BT17_056 : CEntity_Effect
     {

+ 1 - 1
Assets/CardEffect/BT17/Green/Argomon_BT17_048.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT17
 {
     public class Argomon_BT17_048 : CEntity_Effect
     {

+ 1 - 3
Assets/CardEffect/BT17/Green/Argomon_BT17_051.cs

@@ -1,12 +1,10 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Diagnostics.Tracing;
 using System.Linq;
 using UnityEngine;
-using static UnityEditor.PlayerSettings;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT17
 {
     public class Argomon_BT17_051 : CEntity_Effect
     {

+ 1 - 5
Assets/CardEffect/BT17/Green/Terriermon_BT17_043.cs

@@ -1,10 +1,6 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
-using UnityEngine;
-using System.Linq;
-using Photon;
-using System;
-using Photon.Pun;
 
 namespace DCGO.CardEffects.BT17
 {

+ 9 - 5
Assets/Scripts/ResultObject.cs

@@ -4,6 +4,8 @@ using UnityEngine;
 using UnityEngine.UI;
 using Photon.Pun;
 using Photon.Realtime;
+using System;
+
 public class ResultObject : MonoBehaviour
 {
     [SerializeField] Image WinImage;
@@ -15,7 +17,7 @@ public class ResultObject : MonoBehaviour
         this.gameObject.SetActive(false);
     }
 
-    public void ShowResult(Player Winner, bool Surrendered)
+    public void ShowResult(Player Winner, bool Surrendered, string effectName = "")
     {
         this.gameObject.SetActive(true);
 
@@ -30,6 +32,12 @@ public class ResultObject : MonoBehaviour
 
         ResultText.text = "";
 
+        if (String.IsNullOrEmpty(effectName))
+        {
+            log += $"\nEffect:{effectName}";
+            ResultText.text = effectName;
+        }            
+
         if (Winner == GManager.instance.You)
         {
             ContinuousController.instance.PlaySE(GManager.instance.WinSE);
@@ -43,9 +51,7 @@ public class ResultObject : MonoBehaviour
                 ContinuousController.instance.SaveWinCount();
 
                 if (Surrendered)
-                {
                     ResultText.text = "The opponent has surrendered.";
-                }
             }
         }
 
@@ -59,9 +65,7 @@ public class ResultObject : MonoBehaviour
             if (Winner != null)
             {
                 if (Surrendered)
-                {
                     ResultText.text = "You have surrendered.";
-                }
             }
         }
         else

+ 2 - 2
Assets/Scripts/TurnStateMachine.cs

@@ -3205,7 +3205,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
         //EndGame(gameContext.NonTurnPlayer, true);
     }
 
-    public void EndGame(Player Winner, bool Surrendered)
+    public void EndGame(Player Winner, bool Surrendered, string effectName = "")
     {
         foreach (GameObject gb in GManager.instance.CloseWhenEndingGameObjects)
         {
@@ -3248,7 +3248,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
 
         GManager.instance.LoadingObject.gameObject.SetActive(false);
 
-        GManager.instance.resultObject.ShowResult(Winner, Surrendered);
+        GManager.instance.resultObject.ShowResult(Winner, Surrendered, effectName);
 
         EventSystem.current.SetSelectedGameObject(GManager.instance.resultObject.transform.GetChild(3).gameObject);