Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
 public override bool equals(AbstractJob other)
 {
     return(other.get_job_name() == get_job_name() &&
            other is BuildTunnelJob &&
            ((BuildTunnelJob)other).position == position);
 }
Ejemplo n.º 3
0
 public virtual bool equals(AbstractJob other)
 {
     return(false);
 }