Синтаксис:
Используется javascript
function respawn() {
player_x = ( player as GameObject).transform.position.x;
while (i <= map_mobs.length / 3 ) {
if ( player_x - 5.0 > map_mobs[i * 3 - 3] && player_x +5.0< map_mobs[i * 3 - 2]) {
main_x = player_x + (Mathf.Round(Random.value) * 2 - 1) * 9;
......
player_x = ( player as GameObject).transform.position.x;
while (i <= map_mobs.length / 3 ) {
if ( player_x - 5.0 > map_mobs[i * 3 - 3] && player_x +5.0< map_mobs[i * 3 - 2]) {
main_x = player_x + (Mathf.Round(Random.value) * 2 - 1) * 9;
......
выводит ошибку в условии : Operator '>' cannot be used with a left hand side of type 'float' and a right hand side of type 'Object'.
в чем проблем?