public void CheckDestroyed()
    {
        AICities    aic = AICities.instance;
        CityHandler cH  = CityHandler.instance;

        if (!destroyed)
        {
            switch (size)
            {
            case 3:
                if (cityTiles.Count != 3)
                {
                    Debug.Log("City Destroyed!");
                    destroyed = true;
                    if (owner == 0)
                    {
                        cH.DestroyCity(this);
                    }
                    else
                    {
                        aic.DestroyCity(this);
                    }
                }
                break;

            case 4:
                if (cityTiles.Count <= 2)
                {
                    Debug.Log("City Destroyed!");
                    destroyed = true;
                    if (owner == 0)
                    {
                        cH.DestroyCity(this);
                    }
                    else
                    {
                        aic.DestroyCity(this);
                    }
                }
                break;

            case 7:
                if (cityTiles.Count <= 5)
                {
                    Debug.Log(cityTiles.Count);
                    Debug.Log("City Destroyed!");
                    destroyed = true;
                    if (owner == 0)
                    {
                        cH.DestroyCity(this);
                    }
                    else
                    {
                        aic.DestroyCity(this);
                    }
                }
                break;
            }
        }
    }
Example #2
0
    } //Singleton loop

    private void Start()
    {
        msgD       = MsgDisplay.instance;
        cH         = GetComponent <CityHandler>();
        decks      = GetComponent <Decks>();
        deckHandUI = GameObject.Find("UIScripts").GetComponent <DeckHandUI>();
        rP         = GetComponent <ResolutionPhase>();
        aiI        = GetComponent <AIInfo>();
        aiC        = GetComponent <AICities>();
    }
 private void Start()
 {
     msgD = MsgDisplay.instance;
     cC   = CameraControll.instance;
     tS   = TemplateSelection.instance;
     aIC  = AICities.instance;
     turnStructureScript = TurnStructure.instance;
     currentPhase        = initPhase.Welcome;
     msgD.DisplayMessage("Welcome", 2f);
 }
Example #4
0
 private void Awake()
 {
     if (instance != null)
     {
         Debug.Log("Too many AICity Placements!");
         return;
     }
     else
     {
         instance = this;
     }
 }
 private void Start()
 {
     cityPlacementScript   = CityPlacement.instance;
     AICityPlacementScript = AICities.instance;
 }