Created
May 12, 2016 01:02
-
-
Save MarianoGnu/0fbcd6a21e860f58485686c61681c272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tool | |
extends EditorScript | |
func _run(): | |
var scn = get_scene() | |
var container = Node2D.new() | |
container.set_name("background") | |
scn.add_child(container) | |
container.set_owner(scn) | |
for x in range(20): | |
for y in range(15): | |
var s = Sprite.new() | |
s.set_texture(preload("res://scenes/match/match_moved.png")) | |
container.add_child(s) | |
s.set_pos(Vector2(x*84,y*84)) | |
s.set_owner(scn) | |
s = Sprite.new() | |
s.set_texture(preload("res://scenes/match/match_moved.png")) | |
container.add_child(s) | |
s.set_pos(Vector2(x*84+42,y*84-42)) | |
s.set_rot(deg2rad(90)) | |
s.set_owner(scn) | |
s = Sprite.new() | |
s.set_texture(preload("res://scenes/match/match_moved.png")) | |
container.add_child(s) | |
s.set_pos(Vector2(x*84+42,y*84)) | |
s.set_rot(deg2rad(45)) | |
s.set_owner(scn) | |
s = Sprite.new() | |
s.set_texture(preload("res://scenes/match/match_moved.png")) | |
container.add_child(s) | |
s.set_pos(Vector2(x*84+42,y*84)) | |
s.set_rot(deg2rad(135)) | |
s.set_owner(scn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment