Esempio n. 1
0
from Sekai import TestPlayer as Player
from Sekai import Vector3

def checkValues(vec, x, y, z):
	assert(vec.x == x and vec.y == y and vec.z == z)

player1 = Player()

#==============================================================

checkValues(player1.mPositionPtr, 0.0, 0.0, 0.0)

vec = Vector3()
vec.x, vec.y, vec.z = 1.0, 2.0, 3.0
player1.mPosition = vec

checkValues(player1.mPositionPtr, 1.0, 2.0, 3.0)

#==============================================================

player1.mPositionPtr = vec

checkValues(player1.mPositionPtr, 1.0, 2.0, 3.0)

vec.x, vec.y, vec.z = 3.0, 2.0, 1.0

checkValues(player1.mPositionPtr, 3.0, 2.0, 1.0)

#==============================================================

vec.x, vec.y, vec.z = 1.0, 2.0, 3.0
Esempio n. 2
0
from Sekai import TestPlayer as Player

def checkValues(vec, x, y, z):
	assert(vec.x == x and vec.y == y and vec.z == z)

player1 = Player()

checkValues(player1.mPosition, 0.0, 0.0, 0.0)

pos = player1.mPosition
pos.x, pos.y, pos.z = 3.0, 2.0, 1.0

checkValues(player1.mPosition, 0.0, 0.0, 0.0)

checkValues(pos, 3.0, 2.0, 1.0)

player1.mPosition = pos

checkValues(player1.mPosition, 3.0, 2.0, 1.0)

#==================================================

pos.x, pos.y, pos.z = 4.0, 5.0, 6.0

# using setter
player1.Position = pos

#using getter
checkValues(player1.Position, 4.0, 5.0, 6.0)

#==================================================
Esempio n. 3
0
from Sekai import TestPlayer as Player


def checkValues(vec, x, y, z):
    assert (vec.x == x and vec.y == y and vec.z == z)


player1 = Player()

checkValues(player1.mPosition, 0.0, 0.0, 0.0)

pos = player1.mPosition
pos.x, pos.y, pos.z = 3.0, 2.0, 1.0

checkValues(player1.mPosition, 0.0, 0.0, 0.0)

checkValues(pos, 3.0, 2.0, 1.0)

player1.mPosition = pos

checkValues(player1.mPosition, 3.0, 2.0, 1.0)

#==================================================

pos.x, pos.y, pos.z = 4.0, 5.0, 6.0

# using setter
player1.Position = pos

#using getter
checkValues(player1.Position, 4.0, 5.0, 6.0)