public string MoveYConsoleCmd(string[] arg) { string log = ""; if (arg.Length == 2) { int y = 0; int speed = 0; y = System.Convert.ToInt32(arg[0]); speed = System.Convert.ToInt32(arg[1]); luaAction action = new luaAction(); action.moveOnY = y; action.speed = speed; action.movement = true; actions.Enqueue(action); log += "El objeto " + gameObject.name + " se moverá " + y + " en X, a " + speed + " de velocidad..."; } else { log += "Error de parámetros. Parámetros válidos: 'cantidad' 'velocidad'..."; } return(log); }
public string ChangeColorConsoleCmd(string[] arg) { string log = ""; int index = -1; if (arg != null) { index = System.Convert.ToInt32(arg[0]); } if (index > 0 && index < 3) { luaAction action = new luaAction(); action.movement = false; action.color = index; actions.Enqueue(action); log += "Color cambiado..."; } else { log += "Error índice de color. Índice válido: 1 (para rojo), 2 (para blanco)..."; } return(log); }
public void ChangeColor(int index) { luaAction action = new luaAction(); action.movement = false; action.color = index; actions.Enqueue(action); }
public void MoveZ(float z, float speed) { luaAction action = new luaAction(); action.moveOnZ = z; action.speed = speed; action.movement = true; actions.Enqueue(action); }
public void MoveX(float x, float speed) { luaAction action = new luaAction(); action.moveOnX = x; action.speed = speed; action.movement = true; actions.Enqueue(action); }
public void MoveY(float y, float speed) { luaAction action = new luaAction(); action.moveOnY = y; action.speed = speed; action.movement = true; actions.Enqueue(action); }