Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            UnitTower[] towers = FindObjectsOfType(typeof(UnitTower)) as UnitTower[];
            for (int i = 0; i < towers.Length; i++)
            {
                BuildManager.PreBuildTower(towers[i]);
            }

            //ignore collision between shootObject so they dont hit each other
            int soLayer = LayerManager.LayerShootObject();

            Physics.IgnoreLayerCollision(soLayer, soLayer, true);

            if (capLife)
            {
                playerLife = GetPlayerLifeCap();
            }
            if (onLifeE != null)
            {
                onLifeE(0);
            }

            if (enableLifeGen)
            {
                StartCoroutine(LifeRegenRoutine());
            }
        }