Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func _ready():
- var brick_y_size = brick_y_idx.size()
- var brick_x_size = brick_x_idx.size()
- for l in range(0,brick_y_size):
- for i in range(0,brick_x_size):
- randomize()
- var add_brick = randi()%2
- if add_brick == 1:
- var brick = pre_brick.instance()
- brick.global_position = Vector2(brick_x_idx[i],brick_y_idx[l])
- add_child(brick)
- brick.add_to_group("bricks")
- brick.connect("pts" , self , "on_pts")
- $shoot.connect("empty" , $bottom/area , "on_empty")
- $bottom/area.connect("recharge" , $shoot , "on_recharge")
- $bottom/area.connect("game_over" , self , "on_game_over")
- $bottom/area.connect("brick_down" , self , "on_brick_down")
- self.connect("stop_shoot" , $shoot , "on_stop_shoot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement