void Start()// Use this for initialization { BuildSound = (AudioClip)Resources.Load("Audio/Sound Effects/RandomSfx/swhit"); CGG = gameObject.GetComponent <CreateGameGrid>(); GameManager = GameObject.Find("GameManager").GetComponent <GameManagerStuff>(); Grid = CGG.GetGrid(); }
void Start() //Use this for initialization { spawnsound = (AudioClip)Resources.Load("Audio/Sound Effects/AbstractPackSFX/Files/AbstractSfx/17"); Grid = GameObject.Find("GameGrid").GetComponent <CreateGameGrid>().GetGrid(); GameManager = GameObject.Find("GameManager").GetComponent <GameManagerStuff>(); StartCoroutine(Spawning("NextStage", 3)); //Start stageloop ienum }
private void Awake() { GameManager = GameObject.Find("GameManager").GetComponent <GameManagerStuff>(); TowerUI = GameObject.Find("UI/Tower"); ClickerUI = GameObject.Find("UI/Clicker"); UIIndicatorText = GameObject.Find("UIIndicator").transform.GetChild(0).GetComponent <Text>(); }
internal EnemyID CurrentEnemyID; //this enemies type] private void Awake() { maincamera = GameObject.Find("Main Camera"); TeleportSound = (AudioClip)Resources.Load("Audio/Sound Effects/RandomSfx/pot"); KillZoneSound = (AudioClip)Resources.Load("Audio/Sound Effects/RandomSfx/lvlup"); DeathSound = (AudioClip)Resources.Load("Audio/Sound Effects/AbstractPackSFX/Files/AbstractSfx/39"); DamageSound = (AudioClip)Resources.Load("Audio/Sound Effects/AbstractPackSFX/Files/AbstractSfx/73"); CGG = GameObject.Find("GameGrid").GetComponent <CreateGameGrid>().GetGrid(); //finding components needed GameManager = GameObject.Find("GameManager").GetComponent <GameManagerStuff>(); ESp = GameObject.Find("EnemyController").GetComponent <EnemySpawning>(); killzonepathing = new GameObject("killzone pathing"); //create a game ovbject past the last tile of the grid to aim for to ensure death by killzone collision Ally = gameObject; }
internal TowerID CurrentTowerID; //this is used internally void Start() //Use this for initialization { GameManager = GameObject.Find("GameManager").GetComponent <GameManagerStuff>(); EnemyController = GameObject.Find("EnemyController"); ShootSound = (AudioClip)Resources.Load("Audio/Sound Effects/RandomSfx/appleeat"); if (GameManagerStuff.Currency - Cost < 0) { GameManager.PushToEventLog("Not Enough Gold."); Destroy(gameObject); } else { GameManagerStuff.Currency -= Cost; } StartCoroutine(Fire()); LastTowerSelected = gameObject; }