//================================Visial Elements===================================== //===============================Random move===================================== void move(SquareGrid.orientation o) { //before move: chech whether go die grid_node target = sg.get_neighbour(current_node, o); move_to_grid(sg, target); if (target != null) { if (target.state == SquareGrid.grid_stat.exit) { StageController.instance.score_evador += 1; //remove self from board current_node.occupied = false; explode(Color.green); DestroyImmediate(gameObject); } } }
void move(SquareGrid.orientation o) { grid_node target = sg.get_neighbour(current_node, o); move_to_grid(sg, target); }