Example #1
0
    public void MartianAttack(int AttackNr) // Parameter is what number attack it is.
    {
        CombatManager.Instance().SetupEnemy(AttackNr);
        AttackAlertPanel.SetActive(true);
        //AttackResolvePanel.SetActive(true);

        CombatManager.Instance().SetupPlayerForces(); // this hould not be done here!!!!!!!
        // here we calculate attack -or maybe in it own class/method

        MessageManager.Instance().UpdateMessagePanel("Turn: " + NextTurn.Instance().TurnCounter + "\n", "Martian fighterbombers attacked Moonbase! " + "\n"); // Maybe result/Casualties here!?
    }
Example #2
0
    private int count; // for counting up eleements in the finished list

    public void FinishBuild()
    {
        HangarManager.Instance().FinishedItems.Add(this);                                                              // take this object and put it into the list of finished items
                                                          /*HangarManager.Instance().InProductionItems.Remove(this);*/ // take this object and remove it from the list of items which is in production

        if (this.ItemTypeNr == 1)
        {
            HangarManager.Instance().ShipsInService.Add(this);
            // Maybe more here
        }

        if (this.ItemID == 6) // if this is a SolarMK2 then set its panel true. //Note.. we need to update the finished item list if it gets destroyed
        {
            HangarManager.Instance().SolagenMK2.SetActive(true);
        }
        if (this.ItemID == 7) //
        {
            HangarManager.Instance().SolagenMK2.SetActive(true);
            HangarManager.Instance().SolagenMK3.SetActive(true);
        }
        if (this.ItemID == 8)
        {
            HangarManager.Instance().SolagenMK2.SetActive(true);
            HangarManager.Instance().SolagenMK3.SetActive(true);
            HangarManager.Instance().SolagenMK4.SetActive(true);
        }

        this.InProduction = false; // As this item is finished we set it to false

        //Below here: we tell what is finished dbuild and what eventually is next in production que
        string NextProductionItem = "No more items in production que!";

        if (HangarManager.Instance().InProductionItems.Count > 1)
        {
            NextProductionItem = "Still running! "; //+ HangarManager.Instance().InProductionItems[HangarManager.Instance().InProductionItems.Count-1].ItemName; // MAYBE -1 in the list count
        }
        MessageManager.Instance().UpdateMessagePanel("Turn: " + NextTurn.Instance().TurnCounter + ". Item Finished: \n", "          " + this.ItemName + ".   Production status is: " + NextProductionItem + "\n");

        foreach (var FinishedItem in HangarManager.Instance().FinishedItems)                                         // trying to read out the list of build things
        {
            Debug.Log("Finished Item nr " + count + " is:" + HangarManager.Instance().FinishedItems + FinishedItem); // Show in the Debug log whats on this list to show iterate through
            count++;
        }
    }