private void _on_job_added(Job.AbstractJob newJob) { if (newJob.get_job_name().Equals(constant.JobNames.BUILD_TUNNEL)) { var jobs = GetNodeOrNull <singleton.InGameJobs>("/root/in_game_jobs")?.get_copy_of_all_jobs(); List <Vector2> positions = new List <Vector2>(); foreach (var j in jobs) { if (j.get_job_name().Equals(constant.JobNames.BUILD_TUNNEL)) { positions.Add(j.get_cell_pos()); } } generate_ui_mesh(positions.ToArray()); } else { GD.Print("No Tunnel-Job: ", newJob); } }
public override bool equals(AbstractJob other) { return(other.get_job_name() == get_job_name() && other is BuildTunnelJob && ((BuildTunnelJob)other).position == position); }
public virtual bool equals(AbstractJob other) { return(false); }