// Start is called before the first frame update void Start() { greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin; tcpClient = new TcpClient(); tcpClient.ConnectAsync("127.0.0.1", 5050); clientReceiveThread = new Thread(new ThreadStart(ListenForData)); clientReceiveThread.IsBackground = true; clientReceiveThread.Start(); }
// Start is called before the first frame update void Start() { dead = false; animator = GetComponent <Animator>(); socketConnection = GameObject.FindObjectOfType(typeof(SocketConnection)) as SocketConnection; lastWaypointIndex = waypoints.Count - 1; targetWaypoint = waypoints[targetWaypointIndex]; InvokeRepeating("spectrePosition", 0.5f, 2f); greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin; AStar.enabled = false; AStar2.enabled = false; AStar3.enabled = false; Movement.enabled = true; Movement2.enabled = true; }
void Start() { greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin; }
// Start is called before the first frame update void Start() { socketConnection = GameObject.FindObjectOfType(typeof(SocketConnection)) as SocketConnection; greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin; }
// Start is called before the first frame update void Start() { greivin = GameObject.FindGameObjectWithTag("Greivin").GetComponent <Transform>(); greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin; target = new Vector2(greivin.position.x, greivin.position.y); }