compatibility with Godot 3.1

This commit is contained in:
adrienmalin
2019-01-21 16:59:47 +01:00
parent 1b5cccd8c9
commit f220739ffc
5 changed files with 76 additions and 76 deletions

View File

@ -1,70 +1,69 @@
extends "Tetromino.gd"
const CLOCKWISE = -1
const COUNTERCLOCKWISE = 1
const SUPER_ROTATION_SYSTEM = [
{
COUNTERCLOCKWISE: [
Vector3(0, -1, 0),
Vector3(-1, -1, 0),
Vector3(2, -1, 0),
Vector3(-1, 1, 0),
Vector3(2, -2, 0)
],
CLOCKWISE: [
Vector3(1, 0, 0),
Vector3(-1, 0, 0),
Vector3(2, 0, 0),
Vector3(-1, -1, 0),
Vector3(2, 2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(-2, 0, 0),
Vector3(1, 1, 0),
Vector3(-2, -2, 0)
],
CLOCKWISE: [
Vector3(0, -1, 0),
Vector3(-1, -1, 0),
Vector3(2, -1, 0),
Vector3(-1, 1, 0),
Vector3(2, -2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(0, 1, 0),
Vector3(1, 1, 0),
Vector3(-2, 1, 0),
Vector3(1, -1, 0),
Vector3(-2, 2, 0)
],
CLOCKWISE: [
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(-2, 0, 0),
Vector3(1, 1, 0),
Vector3(-2, -2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(1, 0, 0),
Vector3(-1, 0, 0),
Vector3(2, 0, 0),
Vector3(-1, -1, 0),
Vector3(2, 2, 0)
],
CLOCKWISE: [
Vector3(0, 1, 0),
Vector3(1, 1, 0),
Vector3(-2, 1, 0),
Vector3(1, -1, 0),
Vector3(-2, 2, 0)
],
},
]
func _init():
super_rotation_system = [
{
COUNTERCLOCKWISE: [
Vector3(0, -1, 0),
Vector3(-1, -1, 0),
Vector3(2, -1, 0),
Vector3(-1, 1, 0),
Vector3(2, -2, 0)
],
CLOCKWISE: [
Vector3(1, 0, 0),
Vector3(-1, 0, 0),
Vector3(2, 0, 0),
Vector3(-1, -1, 0),
Vector3(2, 2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(-2, 0, 0),
Vector3(1, 1, 0),
Vector3(-2, -2, 0)
],
CLOCKWISE: [
Vector3(0, -1, 0),
Vector3(-1, -1, 0),
Vector3(2, -1, 0),
Vector3(-1, 1, 0),
Vector3(2, -2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(0, 1, 0),
Vector3(1, 1, 0),
Vector3(-2, 1, 0),
Vector3(1, -1, 0),
Vector3(-2, 2, 0)
],
CLOCKWISE: [
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(-2, 0, 0),
Vector3(1, 1, 0),
Vector3(-2, -2, 0)
],
},
{
COUNTERCLOCKWISE: [
Vector3(1, 0, 0),
Vector3(-1, 0, 0),
Vector3(2, 0, 0),
Vector3(-1, -1, 0),
Vector3(2, 2, 0)
],
CLOCKWISE: [
Vector3(0, 1, 0),
Vector3(1, 1, 0),
Vector3(-2, 1, 0),
Vector3(1, -1, 0),
Vector3(-2, 2, 0)
],
},
]