예제 #1
0
 // 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();
 }
예제 #2
0
    // 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;
    }
예제 #3
0
 void Start()
 {
     greivinScript = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin;
 }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     socketConnection = GameObject.FindObjectOfType(typeof(SocketConnection)) as SocketConnection;
     greivinScript    = GameObject.FindObjectOfType(typeof(Greivin)) as Greivin;
 }
예제 #5
0
 // 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);
 }