Ejemplo n.º 1
0
 public grid_node(V2Int pos, SquareGrid.grid_stat g = SquareGrid.grid_stat.empty)
 {
     this.grid_position = pos;
     this.state         = g;
     this.occupied      = false;
     this.not_ideal     = false;
     current_value      = default_value;
     last_value         = default_value;
 }
Ejemplo n.º 2
0
    //this is bullshit,just for beauty
    //consider change it to different sprites for initialization

    Color get_color(SquareGrid.grid_stat state)
    {
        switch (state)
        {
        case SquareGrid.grid_stat.empty:
            return(Color.white);

        case SquareGrid.grid_stat.obstacle:
            return(Color.black);

        case SquareGrid.grid_stat.teleporter:
            return(Color.blue);

        case SquareGrid.grid_stat.exit:
            return(Color.green);

        default:
            return(Color.black);
        }
    }