MContainer_1_C_4.gd 471 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#1 Cover 4
extends MContainerBase

func check_is_on_top(x,y,z):
	if has_tile(x,y,z):
		if z%2 == 0:
			if not has_tile(x,y,z + 1) and not has_tile(x - 1 ,y,z + 1) and not has_tile(x,y - 1 ,z + 1) and not has_tile(x - 1,y - 1,z + 1):
				(box[x][y][z] as MTile).set_is_on_top(true)
		else:
			if not has_tile(x,y,z + 1) and not has_tile(x + 1 ,y,z + 1) and not has_tile(x,y + 1 ,z + 1) and not has_tile(x + 1,y + 1,z + 1):
				(box[x][y][z] as MTile).set_is_on_top(true)