Beispiel #1
0
        void Start()
        {
            _towerRessourceManagement = GetComponentInParent <TowerRessourceManagement>();
            spawnpoints  = new List <GameObject>();
            _towersounds = GetComponentInParent <TowerSounds>();

            for (int i = 0; i < transform.childCount; i++)
            {
                if (transform.GetChild(i).tag == "SpawnpointBubbleTower")
                {
                    spawnpoints.Add(transform.GetChild(i).GetChild(0).gameObject);
                }
            }
        }
Beispiel #2
0
        // Use this for initialization
        void Start()
        {
            // Add a Line Renderer to the GameObject
            towersounds = GetComponent <TowerSounds>();
            line        = gameObject.GetComponentsInChildren <LineRenderer>();

            //line = gameObject.GetComponent(typeof(LineRenderer)) as LineRenderer;
            // Set the width of the Line Renderer
            //line.SetWidth(0.05F, 0.05F);
            // Set the number of vertex fo the Line Renderer
            //line.SetVertexCount(2);
            //line.positionCount= lengthOfLineRenderer;
            line[0].positionCount = 0;
            paths.Add(new Vector3(0, 0, 0));
            //shot();
        }
Beispiel #3
0
 void Awake()
 {
     towersounds = GetComponent <TowerSounds>();
     myTransform = transform;
     StartCoroutine(SimulateProjectile());
 }