forked from team-sg/hero-mark-2
added sprite snapping
This commit is contained in:
parent
f4a6c97ca1
commit
2f99ce7460
3 changed files with 12 additions and 2 deletions
7
scripts/snap_sprite.gd
Normal file
7
scripts/snap_sprite.gd
Normal file
|
@ -0,0 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
onready var base_position = position.round()
|
||||
|
||||
func _process(delta):
|
||||
#Round sprite position
|
||||
global_position = get_parent().global_position.round() + base_position
|
Loading…
Add table
Add a link
Reference in a new issue