Ejemplo n.º 1
0
    public bool Invest(int Amount)
    {
        Health H = transform.GetComponent <Health>();

        if (H.CurrentHealth < H.MaxHealth)
        {
            H.DoDamage(-10 * Amount);
            Game_manager.ChatMessage("Healing Tower...");
            return(true);
        }
        if (Level < 2 && Game_manager.DecreaseKapital(Game_manager.Kapital / 20 + 20))
        {
            Game_manager.ChatMessage("Upgrading Tower...");
            SetLevel(Level + 1);
            return(true);
        }
        else
        {
            Game_manager.ChatMessage("Tower maxed.");
        }
        return(false);
    }