Example #1
0
        private void Start()
        {
            buildingPreview = GetComponent <BuildingPreview>();

            stoneEfficiency = StoneEfficiency.instance;
            stoneEfficiency.efficiencyText.transform.position = Camera.main.WorldToScreenPoint(transform.position) + new Vector3(0, 50, 0);
            stoneEfficiency.efficiencyText.gameObject.SetActive(true);
            stoneEfficiency.SetCirclesState(true);

            line = Instantiate(linePrefab, position: transform.position, rotation: Quaternion.identity);
        }
Example #2
0
        private void Start()
        {
            stoneEfficiency = StoneEfficiency.instance;

            stoneEfficiency.quarryList.Add(this);

            stoneEfficiency.radiusCircleList.Add(rangeLine = Instantiate(rangeLinePrefab, new Vector3(transform.position.x, 1, transform.position.z), Quaternion.identity));

            efficiency = stoneEfficiency.lastEfficiency / 100f;

            StartCoroutine(CollectResources());
        }
Example #3
0
        private void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            if (instance != this)
            {
                Destroy(gameObject);
            }

            CreateStoneMap();
        }