using UnityEngine;
using System.Collections;
public class Move : MonoBehaviour
public GameObject player;
public int speedRotation = 3;
public int speed = 5;
public AnimationClip anima;
public int jumpSpeed = 50;
void Start()
{
player = (GameObject) this.gameObject;
animation.AddClip(anima, "animCube");
}
void Update()
{
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow)) {
player.transform.position
+= player.transform.forward * speed * Time.deltaTime;
animation.CrossFade("animCube");
}
if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) {
player.transform.position
-= player.transform.forward * speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) {
player.transform.Rotate(Vector3.down * speedRotation);
}
if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) {
player.transform.Rotate(Vector3.up * speedRotation);
}
if (Input.GetKeyDown(KeyCode.Space)) {
player.transform.position
+= player.transform.up * jumpSpeed * Time.deltaTime;
}
}
}
Нужно через роутеры находящиеся в разных сетях, с которыми имеется pptp соединение из другой сети, отправлять определенные http запросы на другие ресурсы за роутером. Зачем это надо и почему именно так моего вопроса не касается. Эту задачу прекрасно решает curl, о чем я и написал в вопросе, но это только пол дела, т.к. дальше нужно полученные результаты еще и обработать, для чего нужно написать программу (к этой части вопросов нет). Вот я сперва думал это реализовать все в одной программе, но видимо не судьба...