Пример #1
0
    public void select_(node_code node)
    {
        if (selected_node == node)
        {
            deselect_node();
            return;
        }

        selected_node    = node;
        turrent_to_build = null;
        ui.Set_target(node);
    }
Пример #2
0
    void build_turrent(blue_print blue_print_)
    {
        if (cost.money < blue_print_.cost)
        {
            Debug.Log("No cash");
            return;
        }
        cost.money -= blue_print_.cost;
        GameObject _turrent = (GameObject)Instantiate(blue_print_.prefeb, get_build_position(), Quaternion.identity);

        turrent = _turrent;
        FindObjectOfType <sound_manager>().play("Land");
        turrent_blue = blue_print_;
        GameObject effect_ = (GameObject)Instantiate(buildManager.effect, get_build_position(), Quaternion.identity);

        Destroy(effect_, 5f);

        Debug.Log("turrent build, Left:" + cost.money);
    }
Пример #3
0
 public void select(blue_print turrent)
 {
     turrent_to_build = turrent;
     selected_node    = null;
     ui.hide();
 }