コード例 #1
0
ファイル: ShowMessageAgain.cs プロジェクト: boapeca/DSP
 public void OnMouseDown() //When mouse is clicked on the button
 {
     EndTurn.AdminMessage.text = EndTurn.tempMessage;
     StartCoroutine(DeleteMessage.coroutineB());
 }
コード例 #2
0
ファイル: EndTurn.cs プロジェクト: boapeca/DSP
    public void endOfTurnAttacks()
    {
        AdminMessage.text = "";
        Debug.Log("We got here");
        for (int i = 0; i < PurchaseButton.defencesBought.Count; i++)
        {
            if (PurchaseButton.defencesBought[i] == ScanningKiddie.attackCounter)
            {
                if (ScanningKiddie.attackCountered == true)
                {
                }
                else
                {
                    Debug.Log("1");
                    ScanningKiddie.attackCountered = true;
                    AdminMessage.text            = "Admin Message: " + ScanningKiddie.attackCounterEffect + " \n " + AdminMessage.text + "   \n   " + "   \n   ";
                    ScanningKiddie.turnCountered = PlayGameAssets.currentTurn;
                    ScanningKiddie.whatCounter   = ScanningKiddie.attackCounter;
                }
            }
            if (PurchaseButton.defencesBought[i] == DoSKiddie.attackCounter && (PlayGameAssets.currentTurn >= 2))
            {
                if (DoSKiddie.attackCountered == true)
                {
                }
                else
                {
                    Debug.Log(HackingKiddie.attackCounter[0, 0]);
                    Debug.Log(PurchaseButton.defencesBought[i] + " + " + DoSKiddie.attackCounter);
                    DoSKiddie.attackCountered = true;
                    AdminMessage.text         = "  Admin Message: " + DoSKiddie.attackCounterEffect + "  \n " + AdminMessage.text + "   \n   " + "   \n   ";
                    DoSKiddie.turnCountered   = PlayGameAssets.currentTurn;
                    DoSKiddie.whatCounter     = DoSKiddie.attackCounter;
                }
            }

            if ((PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[1, 0]) || (PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[2, 0]))
            {
                Debug.Log("Test");
                Debug.Log(PurchaseButton.defencesBought[i]);
                if (HackingKiddie.attackCountered == true)
                {
                }
                else
                {
                    HackingKiddie.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[0, 0])
                    {
                        AdminMessage.text         = "  Admin Message: " + HackingKiddie.attackCounterEffect[0, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        HackingKiddie.whatCounter = HackingKiddie.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[1, 0])
                    {
                        AdminMessage.text         = "  Admin Message: " + HackingKiddie.attackCounterEffect[1, 1] + "  \n " + AdminMessage.text + "  \n    ";
                        HackingKiddie.whatCounter = HackingKiddie.attackCounter[1, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == HackingKiddie.attackCounter[2, 0])
                    {
                        AdminMessage.text         = "  Admin Message: " + HackingKiddie.attackCounterEffect[2, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        HackingKiddie.whatCounter = HackingKiddie.attackCounter[2, 0];
                    }
                    HackingKiddie.turnCountered = PlayGameAssets.currentTurn;
                }
            }
            if ((PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[1, 0]) || (PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[2, 0]))
            {
                if (PhishingKiddie.attackCountered == true)
                {
                }
                else
                {
                    PhishingKiddie.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[0, 0])
                    {
                        AdminMessage.text          = "  Admin Message: " + PhishingKiddie.attackCounterEffect[0, 1] + " \n  " + AdminMessage.text + "   \n   ";
                        PhishingKiddie.whatCounter = PhishingKiddie.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[1, 0])
                    {
                        AdminMessage.text          = "  Admin Message: " + PhishingKiddie.attackCounterEffect[1, 1] + "  \n " + AdminMessage.text + "  \n    ";
                        PhishingKiddie.whatCounter = PhishingKiddie.attackCounter[1, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == PhishingKiddie.attackCounter[2, 0])
                    {
                        PhishingKiddie.whatCounter = PhishingKiddie.attackCounter[2, 0];
                    }

                    PhishingKiddie.turnCountered = PlayGameAssets.currentTurn;
                }
            }
            if ((PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[1, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[2, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[3, 0]))
            {
                if (MafiaAPTPCOffices.attackCountered == true)
                {
                }
                else
                {
                    MafiaAPTPCOffices.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[0, 0])
                    {
                        AdminMessage.text             = "  Admin Message: " + MafiaAPTPCOffices.attackCounterEffect[0, 1] + "  \n " + AdminMessage.text + "  \n    ";
                        MafiaAPTPCOffices.whatCounter = MafiaAPTPCOffices.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[1, 0])
                    {
                        AdminMessage.text             = "  Admin Message: " + MafiaAPTPCOffices.attackCounterEffect[1, 1] + " \n  " + AdminMessage.text + "   \n   ";
                        MafiaAPTPCOffices.whatCounter = MafiaAPTPCOffices.attackCounter[1, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[2, 0])
                    {
                        AdminMessage.text             = "  Admin Message: " + MafiaAPTPCOffices.attackCounterEffect[2, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        MafiaAPTPCOffices.whatCounter = MafiaAPTPCOffices.attackCounter[2, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTPCOffices.attackCounter[3, 0])
                    {
                        MafiaAPTPCOffices.whatCounter = MafiaAPTPCOffices.attackCounter[3, 0];
                    }
                    MafiaAPTPCOffices.turnCountered = PlayGameAssets.currentTurn;
                }
            }
            if ((PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[1, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[2, 0]))
            {
                if (MafiaAPTServerOffices.attackCountered == true)
                {
                }
                else
                {
                    MafiaAPTServerOffices.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[0, 0])
                    {
                        AdminMessage.text = "  Admin Message: " + MafiaAPTServerOffices.attackCounterEffect[0, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        MafiaAPTServerOffices.whatCounter = MafiaAPTServerOffices.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[1, 0])
                    {
                        AdminMessage.text = "  Admin Message: " + MafiaAPTServerOffices.attackCounterEffect[1, 1] + " \n  " + AdminMessage.text + "  \n    ";
                        MafiaAPTServerOffices.whatCounter = MafiaAPTServerOffices.attackCounter[1, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerOffices.attackCounter[2, 0])
                    {
                        MafiaAPTServerOffices.whatCounter = MafiaAPTServerOffices.attackCounter[2, 0];
                    }
                    MafiaAPTServerOffices.turnCountered = PlayGameAssets.currentTurn;
                }
            }
            if ((PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[1, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[2, 0]) || (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[3, 0]))
            {
                if (MafiaAPTServerPlant.attackCountered == true)
                {
                }
                else
                {
                    MafiaAPTServerPlant.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[0, 0])
                    {
                        AdminMessage.text = "  Admin Message: " + MafiaAPTServerPlant.attackCounterEffect[0, 1] + " \n  " + AdminMessage.text + "  \n    ";
                        MafiaAPTServerPlant.whatCounter = MafiaAPTServerPlant.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[2, 0])
                    {
                        AdminMessage.text = "  Admin Message: " + MafiaAPTServerPlant.attackCounterEffect[2, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        MafiaAPTServerPlant.whatCounter = MafiaAPTServerPlant.attackCounter[2, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[1, 0])
                    {
                        MafiaAPTServerPlant.whatCounter = MafiaAPTServerPlant.attackCounter[1, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaAPTServerPlant.attackCounter[3, 0])
                    {
                        MafiaAPTServerPlant.whatCounter = MafiaAPTServerPlant.attackCounter[3, 0];
                    }

                    MafiaAPTServerPlant.turnCountered = PlayGameAssets.currentTurn;
                }
            }
            if ((PurchaseButton.defencesBought[i] == MafiaDisruptionController.attackCounter[0, 0]) || (PurchaseButton.defencesBought[i] == MafiaDisruptionController.attackCounter[1, 0]))
            {
                if (MafiaDisruptionController.attackCountered == true)
                {
                }
                else
                {
                    MafiaDisruptionController.attackCountered = true;
                    if (PurchaseButton.defencesBought[i] == MafiaDisruptionController.attackCounter[0, 0])
                    {
                        AdminMessage.text = "  Admin Message: " + MafiaDisruptionController.attackCounterEffect[0, 1] + "  \n " + AdminMessage.text + "   \n   ";
                        MafiaDisruptionController.whatCounter = MafiaDisruptionController.attackCounter[0, 0];
                    }
                    if (PurchaseButton.defencesBought[i] == MafiaDisruptionController.attackCounter[1, 0])
                    {
                        MafiaDisruptionController.whatCounter = MafiaDisruptionController.attackCounter[1, 0];
                    }
                    MafiaDisruptionController.turnCountered = PlayGameAssets.currentTurn;
                }
            }
        }
        tempMessage = AdminMessage.text;
        StartCoroutine(DeleteMessage.coroutineB());
    }