コード例 #1
0
    private void Update()
    {
        if (visual != null)
        {
            SetData();
        }
        else
        {
            InfoData.text  = "No Target";
            QueueData.text = "";
        }

        if (Input.GetKeyDown(KeyCode.Mouse0))
        {
            RaycastHit hit;
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit))
            {
                Transform objectHit = hit.transform;
                if (objectHit.GetComponent <Visualise>())
                {
                    visual = objectHit.GetComponent <Visualise>();
                }

                // Do something with the object that was hit by the raycast.
            }
        }
    }
コード例 #2
0
 private void Awake()
 {
     visualise            = GetComponent <Visualise>();
     burst                = burstCount;
     projectileFireSystem = GetComponent <ProjectileFireSystem>();
     StartCoroutine(FireUpdater());
 }
コード例 #3
0
 private void Awake()
 {
     lr = GetComponent <LineRenderer>();
     lr.SetPosition(0, transform.position);
     visualise = GetComponent <Visualise>();
     motion    = GetComponent <Motion>();
     dataLink  = GetComponent <DataLink>();
 }
コード例 #4
0
 private void Awake()
 {
     visualise = GetComponent <Visualise>();
     ResetTracking();
 }
コード例 #5
0
 private void Awake()
 {
     visualise = GetComponent <Visualise>();
     dataLink  = GetComponent <DataLink>();
     StartCoroutine(ComputeCycle());
 }
コード例 #6
0
 private void Awake()
 {
     visualise = GetComponent <Visualise>();
 }