Esempio n. 1
0
    IEnumerator UpdateCoroutine(int wellIndex)
    {
        while (true)
        {
            well = WellsController.instance.wells[wellIndex];
            UpdatePopup();
            yield return(new WaitForEndOfFrame());

            if (Input.GetKey(KeyCode.Escape))
            {
                Close();
            }
        }
    }
Esempio n. 2
0
    // Adding well method
    public void AddWell(Well well)
    {
        if (wells.FindIndex(x => x.wellData.id.Equals(well.id)) > -1)
        {
            wells.Find(x => x.wellData.id.Equals(well.id)).wellData = well;
            return;
        }

        WellController wellController = Instantiate(wellPrefab, this.transform).GetComponent <WellController>();

        wellController.wellData = well;
        wells.Add(wellController);
        wellController.name = well.nick;
        wellController.transform.position = new Vector3(well.position.x, 2, well.position.z);
        wellController.GetComponent <CircleLineRenderer>().CreatePoints(16, AppConstants.Object1Range / 8f, 0.1f);
        wellController.GetComponent <SphereCollider>().enabled = true;
    }