-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dc9a80
commit a199329
Showing
7 changed files
with
108 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
extends Node2D | ||
onready var oMirrorPlacementCheckBox = Nodelist.list["oMirrorPlacementCheckBox"] | ||
|
||
const TILE_SIZE = 96 | ||
var LINE_ALPHA:float = 0.03 setget set_line_alpha | ||
|
||
func set_line_alpha(setVal): | ||
LINE_ALPHA = setVal | ||
update() | ||
|
||
func _draw(): | ||
if LINE_ALPHA == 0: return | ||
if oMirrorPlacementCheckBox.pressed == false: return | ||
for i in range(2): | ||
var size1 = M.xSize if i == 0 else M.ySize | ||
var size2 = M.ySize if i == 0 else M.xSize | ||
|
||
var center = floor(size1 * 0.5) | ||
var offset = 0.5 if size1 % 2 == 1 else 0 | ||
var thickness = 0.15 | ||
|
||
var start = Vector2(center + offset - thickness, 0) | ||
var end = Vector2(center + offset + thickness, size2) | ||
|
||
if i == 1: | ||
start = Vector2(start.y, start.x) | ||
end = Vector2(end.y, end.x) | ||
|
||
draw_rect(Rect2(start * TILE_SIZE, (end - start) * TILE_SIZE), Color(1, 1, 1, LINE_ALPHA), true) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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