コード例 #1
0
    // Start is called before the first frame update
    void Awake()
    {
        mainCamera = Camera.main.gameObject;
        autoScript = GetComponent <AutomaticController>();
        canvas     = GameObject.FindGameObjectWithTag("Canvas");
        GameObject check = GameObject.FindGameObjectWithTag("Buttons");

        topDownCamera = GameObject.Find("TopDownCamera");
        if (topDownCamera == null)
        {
            topDownCamera = Instantiate(topDownCameraTemplate, topDownCameraTemplate.transform.position, topDownCameraTemplate.transform.rotation);
        }

        if (canvas != null && check == null)
        {
            Destroy(canvas);
            canvas = Instantiate(canvasTemplate);
        }

        if (canvas == null)
        {
            canvas = Instantiate(canvasTemplate);
        }

        mouseLook = Camera.main.GetComponent <SmoothMouseLook>();
    }
コード例 #2
0
        private void InitAutomaticCalculations()
        {
            autoController = new AutomaticController(sweepProgressBar);

            interfacesBox.ItemsSource = autoController.connectionsCollection;

            autoTable.ItemsSource = autoController.discoveredHosts;

            autoResultTable.ItemsSource = autoController.resultCollection;
        }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     commandController = GameObject.FindGameObjectWithTag("Player").GetComponent <AutomaticController>();
 }
コード例 #4
0
 // Start is called before the first frame update
 void Awake()
 {
     commandGiver = GetComponent <AutomaticController>();
 }