public void select_(node_code node) { if (selected_node == node) { deselect_node(); return; } selected_node = node; turrent_to_build = null; ui.Set_target(node); }
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); }
public void select(blue_print turrent) { turrent_to_build = turrent; selected_node = null; ui.hide(); }