public Wave(EnemySpawner eS, MeteoriteSpawner mS, float delay) { _enemySpawner = eS; _meteoriteSpawner = mS; _attackPatternDelay = delay; _waveActive = false; }
void Start () { spawner = GetComponent<EnemySpawner>(); details = GetComponent<FormationDetails>(); enemyBounds = GameObject.Find("EnemyZone").GetComponent<BoundingZone>(); curSpeed = new Vector2(0.0f, 0.0f); }
// Use this for initialization void Start() { enemySpawner = GameObject.FindGameObjectWithTag("EnemySpawner").GetComponent<EnemySpawner>(); enemySpawner.addEnemy(); this.GetComponent<Renderer>().sharedMaterial = material[enemySpawner.rand]; }
void Awake() { night = 0; dayNight = FindObjectOfType<DayNight>(); enemySpawner = GetComponent<EnemySpawner>(); itemSpawner = GetComponent<ItemSpawner>(); audioManager = GetComponent<AudioManager>(); }
// Use this for initialization void Start () { _normalSize = Camera.main.orthographicSize; this.players = GameObject.FindGameObjectsWithTag ("Player").ToList(); this._spawner = new EnemySpawner (); this._enemies = new List<GameObject> (); this.MinYBound = LowerBound.transform.position.y; this.MaxYBound = UpperBound.transform.position.y; }
//public PathNode m_startNode; //存储敌人出场顺序的xml void Awake() { if(instance == null) { instance = this; } ReadXML(); }
void Start() { gameManager = this; enemySpawner = GetComponent<EnemySpawner>(); HUD.textCoins.text = "Coins: " + coins; HUD.textStage.text = "Stage: " + stage; HUD.textLife.text = "Life: " + life; }
void Start() { instance = this; Vector3 newPosition = Camera.main.ScreenToWorldPoint(new Vector3(Camera.main.pixelWidth, 0)); newPosition.y = 23; newPosition.z = 0; transform.position = newPosition; }
// So could be virtual or whatnot for a smooth outcome public void BuildPools() { _spawner = new EnemySpawner(new EnemySpawner.EnemyPool[] { new EnemySpawner.EnemyPool() { type = Enemy.Type.DRONE, weapon = WeaponName.NONE, count = 3}, new EnemySpawner.EnemyPool() { type = Enemy.Type.DRONE, weapon = WeaponName.PISTOL, count = 1}, new EnemySpawner.EnemyPool() { type = Enemy.Type.DRONE, weapon = WeaponName.MACHINE_GUN, count = 1}, }); }
void Start() { scoreKeeper = GameObject.Find("Score").GetComponent<ScoreKeeper>(); explosionSound = GameObject.FindObjectOfType<AudioClip>(); spawnerLevel = GameObject.FindObjectOfType<EnemySpawner>(); //shots per second increases with level shotsPerSecond = spawnerLevel.beginningLevel / 3; }
// Use this for initialization void Start() { delay = Random.Range(delay - range, delay + range); player_ship = GameObject.Find("Ship"); enemy_spawner = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); Invoke("showLaser", delay - 1); Invoke("DelayedFire", delay); transform.position = new Vector3(Random.Range(-14, 14), 0, 0); }
void levelSelect(LevelCount level) { int enemyCount = levelSet[level]; int timeInterval = timeIntervalSet[enemyCount]; enemySpawner = new EnemySpawner(enemyCount, timeInterval); enemySpawner.spawnEnemies(); collisionManager.resetEnemyList(enemySpawner); GameObject go = GameObject.FindGameObjectWithTag("LevelText"); go.guiText.text = "Level " + (currentLevel + 1).ToString(); }
void Awake() { spawner = this; GameManager.EndEvent += delegate { enemiesToSpawn.Clear (); }; GameManager.BeginEvent += delegate { SpawnMoreEnemies (); SpawnMoreEnemies (); }; }
void Start() { buttonReleaseScript = GameObject.Find("ButtonRelease").GetComponent<ButtonReleased>(); enemySpawner = GameObject.Find("EnemySpawner").GetComponent<EnemySpawner>(); GetComponent<Animation>().CrossFade("Mooing"); IdleState(); sm = GameObject.Find("SoundManager").GetComponent<SoundManager>(); spawn.timer = timer; spawnLocation = this.transform.position; StartBottles(); }
private void Awake() { Instance = this; InitializePools(); if (GameManager.Instance.GetGameMode() == GameMode.ENDLESS) { StartCoroutine(EndlessSpawn()); } }
void Start() { spriteRenderer = GetComponent <SpriteRenderer>(); enemy = GetComponent <Enemy>(); enemySpawner = GetComponent <EnemySpawner>(); player = GetComponent <Player>(); gameMaster = GameObject.Find("GameMaster").GetComponent <GameMaster>(); audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>(); originalColor = spriteRenderer.color; }
void Awake() { newPosition = transform.position; TopHitbox = TopHitboxObject.GetComponent <HitboxDetection>(); LeftHitbox = LeftHitboxObject.GetComponent <HitboxDetection>(); BottomHitbox = BottomHitboxObject.GetComponent <HitboxDetection>(); RightHitbox = RightHitboxObject.GetComponent <HitboxDetection>(); enemySpawnerScript = enemySpawner.GetComponent <EnemySpawner>(); previousPosition = transform.position; }
private int GetTotalEnemies() { int totalEnemies = 0; for (int i = 0; i < EnemySpawnerParent.transform.childCount; i++) { EnemySpawner actualSpawner = EnemySpawnerParent.transform.GetChild(i).GetComponent <EnemySpawner> (); totalEnemies += actualSpawner.GetTotalEnemyCount(); } return(totalEnemies); }
public override void OnInspectorGUI() { spawner = target as EnemySpawner; base.OnInspectorGUI(); if (GUILayout.Button("Generate Curve")) { for (int i = 0; i < 1000; i++) { spawner.GenerateCurve(); } } }
private int spawnCounter; //menghitung sudah berapa kali boss keluar // Use this for initialization void Start() { rand = new System.Random(); Player = GameObject.Find("player"); enemySpawner = GameObject.Find("enemyFormation").GetComponent <EnemySpawner>(); sweeperSpawner = GameObject.Find("SweeperSpawner").GetComponent <SweeperSpawnerScript>(); disturberSpawner = GameObject.Find("DisturbingEnemySpawner").GetComponent <SweeperSpawnerScript>(); isBossAlreadySpawned = false; StageClearUI = StageClearHolder.GetComponent <StageUIScript> (); BossWarningUI = BossWarningHolder.GetComponent <BossWarningUIScript> (); PlayerPrefs.SetFloat("BossHealth", bossHealth); //pertama kali mulai, health boss awal }
// Use this for initialization void Start() { points = 0; time = 0; isRunning = false; endScreen = false; started = false; Time.timeScale = 0; enemiesOnScreen = 1; StartCoroutine("StartGame"); myEnemySpawner = GameObject.Find("EnemySpawner").GetComponent <EnemySpawner>(); }
public void UpdateEnemyData() { memberData.Clear(); EnemySpawner enemySpawner = GameObject.Find("Level Designer").GetComponent <EnemySpawner>(); for (int i = 0; i < enemySpawner.enemyDetails.Count; i++) { MemberData temp = new MemberData(enemySpawner.enemyDetails[i].enemyName, enemySpawner.enemyDetails[i].enemyPrefab.GetComponentInChildren <MeshRenderer>().sharedMaterial); memberData.Add(temp); } }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this); } else { Destroy(this); } }
// Update is called once per frame void Update() { if (enemyHealth <= 0) { // 怪物死亡 Instantiate(enemyDeathEffect, transform.position, transform.rotation); ScoreManager.AddPoint(enemyPoint); // 加分 Destroy(gameObject); EnemySpawner.AddBeatCount(); // 增加殺敵數 enemySpawner.DecreaseEnemyCount(); // 減少總數 } }
private void Start() { mMeteorSpawnerScript = mMeteorSpawner.GetComponent <MeteorSpawnerScript>(); findLivesdone = false; //UI Cache onOffRocketGroup = rocketUICollection.GetComponent <SetActiveDeactivate>(); onOFFRocketUI1 = rocketUI1.GetComponent <SetActiveDeactivate>(); onOFFRocketUI2 = rocketUI2.GetComponent <SetActiveDeactivate>(); onOFFRocketUI3 = rocketUI3.GetComponent <SetActiveDeactivate>(); onOffLivesGroup = livesUICollection.GetComponent <SetActiveDeactivate>(); onOFFLiveUI1 = liveUI1.GetComponent <SetActiveDeactivate>(); onOFFLiveUI2 = liveUI2.GetComponent <SetActiveDeactivate>(); onOFFLiveUI3 = liveUI3.GetComponent <SetActiveDeactivate>(); //Cache some spawners to access thier script enemySpawnerScriptLevelOne = enemySpawnerObjectLevelOne.GetComponent <EnemySpawner>(); bossSpawnerScriptLevelOne = bossSpawnerObjectLevelOne.GetComponent <EnemySpawner>(); enemySpawnerScriptLevelTwo = enemySpawnerObjectLevelTwo.GetComponent <EnemySpawner>(); bossSpawnerScriptLevelTwo = bossSpawnerObjectLevelTwo.GetComponent <EnemySpawner>(); enemySpawnerScriptLevelThree = enemySpawnerObjectLevelThree.GetComponent <EnemySpawner>(); bossSpawnerScriptLevelThree = bossSpawnerObjectLevelThree.GetComponent <EnemySpawner>(); enemySpawnerScriptLevelFour = enemySpawnerObjectLevelFour.GetComponent <EnemySpawner>(); bossSpawnerScriptLevelFour = bossSpawnerObjectLevelFour.GetComponent <EnemySpawner>(); enemySpawnerScriptLevelFive = enemySpawnerObjectLevelFive.GetComponent <EnemySpawner>(); bossSpawnerScriptLevelFive = bossSpawnerObjectLevelFive.GetComponent <EnemySpawner>(); //cache some spaners to access thier SetActiveProperty enemySpawnerSetActiveScriptLevelOne = enemySpawnerObjectLevelOne.GetComponent <SetActiveDeactivate>(); bossSpawnerSetActiveScriptOne = bossSpawnerObjectLevelOne.GetComponent <SetActiveDeactivate>(); enemySpawnerSetActiveScriptLevelTwo = enemySpawnerObjectLevelTwo.GetComponent <SetActiveDeactivate>(); bossSpawnerSetActiveScriptTwo = bossSpawnerObjectLevelTwo.GetComponent <SetActiveDeactivate>(); enemySpawnerSetActiveScriptLevelThree = enemySpawnerObjectLevelThree.GetComponent <SetActiveDeactivate>(); bossSpawnerSetActiveScriptThree = bossSpawnerObjectLevelThree.GetComponent <SetActiveDeactivate>(); enemySpawnerSetActiveScriptLevelFour = enemySpawnerObjectLevelFour.GetComponent <SetActiveDeactivate>(); bossSpawnerSetActiveScriptFour = bossSpawnerObjectLevelFour.GetComponent <SetActiveDeactivate>(); enemySpawnerSetActiveScriptLevelFive = enemySpawnerObjectLevelFive.GetComponent <SetActiveDeactivate>(); bossSpawnerSetActiveScriptFive = bossSpawnerObjectLevelFive.GetComponent <SetActiveDeactivate>(); //Cache some more playerObjectScript = playerObject.GetComponent <Player>(); accessPressCSetActiveScript = pressCText.GetComponent <SetActiveDeactivate>(); introTextSetActiveDeactivate = LevelIntroductionText.GetComponent <SetActiveDeactivate>(); canvasScoreActivateDeactivate = canvasScoreTextObject.GetComponent <SetActiveDeactivate>(); //FindObjectsoftype musicPlayerScript = FindObjectOfType <MusicPlayer>(); //Initializing Values on Start RPGUpdate0UI(); CheckNumberOfLivesAndUpdate(); numberOfLives = 3; //StartCoroutine(LevelOneIntroduction()); }
// Use this for initialization void Start() { speed = Random.Range(.07f, .15f); player_ship = GameObject.Find("Ship"); enemy_spawner = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); foreach (Transform child in transform) { items.Add(child.gameObject); } items[0].SetActive(!ShipController.S.inv); items[1].SetActive(ShipController.S.inv); }
public EnemyCreateEvent(int fc, int ec, int pc) { code = 2; frameCode = fc; pathCode = pc; enemyCode = ec; marker = Test.instance.CreateMarker(1).GetComponent <EnemySpawner>(); marker.target = this; marker.path = Test.instance.path.data[pathCode]; marker.Init(frameCode); }
private void SetLaneSpawner() { EnemySpawner[] spawners = FindObjectsOfType <EnemySpawner>(); foreach (EnemySpawner spawner in spawners) { if (GetIsCloseEnough(spawner)) { myLaneSpawner = spawner; } } }
private void Start() { enemySpawner = GetComponent <EnemySpawner>(); intervalMultiplierTemp = enemySpawner.GetIntervalMultiplier(); dogAnimator = GameObject.Find("Dog").GetComponent <Animator>(); // Get audio references AudioSource[] audioSources = GetComponents <AudioSource>(); audioBackgroundMusic = audioSources[0]; audioSplat = audioSources[1]; }
private void Awake() { DontDestroyOnLoad(this); if (spawnerInstance == null) { spawnerInstance = this; } else { Object.Destroy(gameObject); } }
public override bool HandleEvent(GameEvent e, Object value) { switch (e) { // called on trigger enter case GameEvent.CLASS_TYPE_ENEMY_SPAWNER: spawner = (EnemySpawner)value; spawner.Begin(); break; } return(true); }
public bool BuildTower(TowerBase obj) { if (tower || !obj || playerInside || EnemySpawner.CalculateAI(parent, coords.y, coords) == null) { return(false); } tower = Instantiate(obj, transform); EventBus.Post(new EventWorldChanged(parent)); return(true); }
private void Awake() { if (Instance != null) { Debug.Log("Ther is already one build manager"); Destroy(gameObject); } else { Instance = this; } }
public override List <EnemyBody> GetAnyRequiredEnemies(Level level) { var spawnLoc = GetBossSpawnLocation(); Boss = EnemySpawner.SpawnBoss(spawnLoc).GetComponent <EnemyBody>(); Boss.xPos = spawnLoc.x; Boss.zPos = spawnLoc.y; (Boss.AI as BossBrain).BossRoom = this; return(new List <EnemyBody> { Boss.GetComponent <EnemyBody>() }); }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(gameObject); } }
public void SetEnemySpawner(EnemySpawner _enemySpawner) { enemySpawner = _enemySpawner; // Set spawner start time to 0, to start upon triggered // enemySpawner.StartTime = 0; if (!TriggerOnce) { enemySpawner.DestoryAfterSpawning = false; } }
private void Awake() { if (s_Instance == null) { s_Instance = this; } Enemy.s_OnDestroyEnemy += RemoveEnemyFromList; GameManager.s_OnGameStop += StopEnemySpawning; PauseCheck.Pause += TogglePause; MapLoader.s_OnMapLoaded += OnMapLoaded; }
// Start is called before first frame update private void Start() { // Set self reference instance = this; // Set initial values minTime = 1.0f; maxTime = 5.0f; spawnTime = 5.0f; time = 0f; canSpawn = true; canAddDiff = true; }
private void TrySpawnEnemies() { // Spawning logic: // The game should start out pretty slow with random enemies coming from above and few formations making up. // Then the game will start spamming shooting enemies protected by shielded enemies. // Shooting enemies should shoot a bit faster over time. // At some point, enemies that go accross the screen should start appearing. The player should avoid those. // Finally, have a hard enemy cap otherwise the game will lag from too many enemies and bullets. // // Math spawning logic: // -------------------- // Game start: // Zooming Enemies rate: 0% // Formation rate: 0.1% // -------------------- // Rate increase: // Formation rate: 0.1% per second, 0.2% when above 10%, caps at 33% // Zooming Enemies rate: 0% per second, 0.1% when formation rate is at 10%, caps at 33% double time = GlobalTime.ElapsedGameMilliseconds / 1000; if (formationRate < MAX_FORMATION_RATE) { formationRate += (formationRate > 10 ? 0.0025 : 0.0015) * time; } if (formationRate > 0.1 && zoomingRate < MAX_ZOOMING_RATE) { zoomingRate += 0.001 * time; } if (currentSpawnLimit > SPAWN_LIMIT_PER_SECOND_MAX) { currentSpawnLimit -= 0.0005 * time; } spawnTime += time; if (spawnTime > currentSpawnLimit) { spawnTime -= currentSpawnLimit; double rng = random.NextDouble(); if (rng < formationRate) { EnemySpawner.SpawnFormation(); } else if (rng > (1 - zoomingRate)) { EnemySpawner.SpawnZooming(random.Next(0, 32), (10000 / (score == 0 ? 1 : score)) > 5 ? 5 : (10000 / (score == 0 ? 1 : score)) < 2.5 ? 2.5 : 10000 / score); } else { EnemySpawner.SpawnNonSpecial(random.Next(0, 8), random.Next(0, 3)); } } }
// Use this for initialization void Start() { timer = GetComponentInParent <EnemyTimer> (); timer.generateAnEnemy = GenerateEnemy; playerHitScript = Player.GetComponent <PlayerHitDetection> (); playerHitScript.killEnemy = KillEnemy; playerControlScript = Player.GetComponent <PlayerControlScript> (); gameOverCanvas.enabled = false; sound = GetComponentInParent <SoundScript> (); spawner = GetComponent <EnemySpawner> (); Floor2.SetActive(false); }
void Start() { m_timer = m_firstShootTime; m_rb = GetComponent <Rigidbody>(); transform.LookAt(FindObjectOfType <Player>().transform); EnemySpawner enemySpawner = FindObjectOfType <EnemySpawner>(); m_v2MoveAngleRange = enemySpawner.m_spawnAngleRange; m_v2MoveMinMaxHeight = enemySpawner.m_spawnMinMaxHeight; m_fMoveRadius = enemySpawner.m_spawnRadius; GetNewMovementPoint(); }
public override void OnStartServer() { base.OnStartServer(); enemy_spawner_ = FindObjectOfType<EnemySpawner>(); for (int i = 0; i < 1; i++) { enemys.Add(enemy_spawner_.CreateEnemy(i)); } StartCoroutine("Room1"); }
void Awake() { // Create singleton reference if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
private void Start() { difficultyincreasing = true; enemySpawner = FindObjectOfType <EnemySpawner>(); scoreManager = FindObjectOfType <ScoreManager>(); healthBar = FindObjectOfType <HealthBar>(); difficultyUpTime = difficultyUpTimeStart; }
// Start is called before the first frame update void Start() { enemySpawner = FindObjectOfType <EnemySpawner>(); if (enemySpawner.GetLooping()) { timerText = GetComponent <TextMeshProUGUI>(); } else { Destroy(gameObject); } }
public IEnumerator EnemySpawnerCreatesNewEnemy() { int initialEnemyCount = GameObject.FindObjectsOfType <Enemy>().Length; IEnemySpawner enemySpawner = new EnemySpawner(); enemySpawner.SpawnEnemy(); yield return(null); int enemyCountAfterSpawn = GameObject.FindObjectsOfType <Enemy>().Length; UnityEngine.Assertions.Assert.AreEqual(initialEnemyCount + 1, enemyCountAfterSpawn); }
// Use this for initialization void Start() { player_ship = GameObject.Find("Ship"); enemy_spawner = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); foreach (Transform child in transform) { items.Add(child.gameObject); } frames = framesBetween - framesToWaitToStart; items[0].SetActive(!ShipController.S.inv); items[1].SetActive(ShipController.S.inv); }
// Use this for initialization void Start () { //transform.rotation = Quaternion.Euler(0, 0, 90); player_ship = GameObject.Find("Ship"); spin = false; move(); es = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); foreach (Transform child in transform) { items.Add(child.gameObject); } items[0].SetActive(!ShipController.S.inv); items[1].SetActive(ShipController.S.inv); }
void SetMyLaneSpawner() { //check all spawners //MasterSpawner mSpawner = GameObject.FindObjectOfType<MasterSpawner>(); //EnemySpawner[] spawnerArray2 = mSpawner.GetComponents<EnemySpawner>(); EnemySpawner[] spawnerArray = GameObject.FindObjectsOfType<EnemySpawner>(); foreach (EnemySpawner spawner in spawnerArray) { //if enemy spawner equals positions of shooter/defender if (spawner.transform.position.y == transform.parent.position.y) { myLaneSpawner = spawner; return; } } Debug.LogError(name + " can't find spawner in lane " + transform.position.y); }
void Start () { this.spawner = GameObject.Find("EnemySpawner").GetComponent<EnemySpawner>(); this.playerMotion = GameObject.Find("Player").GetComponent<GyroMove>(); if (PlayerPrefs.GetInt("done_tutorial") != 1) { spawner.enabled = false; playerMotion.enabled = false; } else { this.Die(); } }
// Use this for initialization void Start() { es = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); ship_controller = GameObject.Find("Ship").GetComponent<ShipController>(); // Add all implemented abilities to list mods.Add("turret"); mods.Add("sprinter"); mods.Add("spinner"); mods.Add("missle"); mods.Add("swapSticks"); mods.Add("inverseWorld"); UI.SetActive(false); }
EnemySpawner GetFurthestSpawner(EnemySpawner spawner) { float distance = 0f; EnemySpawner opposite = null; foreach (EnemySpawner s in spawners) { float temp = (s.transform.position - spawner.transform.position).magnitude; if (temp > distance) { distance = temp; opposite = s; } } return opposite; }
// Use this for initialization void Start () { // Sin sinSpeed = Random.Range(1, 7); rb = GetComponent<Rigidbody2D> (); yPos = rb.position.y; spawner = GameObject.FindGameObjectWithTag ("Spawner"); enemySpawner = spawner.GetComponent<EnemySpawner> (); Debug.Log (entrySound); StartCoroutine (EntrySound ()); Destroy (gameObject, maxLifeTime); }
// Use this for initialization void Start () { es = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); ship_controller = GameObject.Find("Ship").GetComponent<ShipController>(); rigid = gameObject.GetComponent<Rigidbody>(); // Add all implemented abilities to list abilities.Add("Blink"); abilities.Add("Time Slow"); abilities.Add("Shield"); abilities.Add("Invincible"); abilities.Add("Hex Fire"); abilities.Add("Fire Trail"); abilities.Add("Invert"); abilities.Add("Freeze"); abilities.Add("Double Shot"); abilities.Add("Paddle"); }
void Awake() { // retrieve all states basicState = GetComponent<SpiderTankBasicState>(); fleeState = GetComponent<SpiderTankFleeState>(); healState = GetComponent<SpiderTankHealState>(); laserSpin = GetComponent<SpiderTankLaserSpin>(); rushState = GetComponent<SpiderTankRushState>(); turboState = GetComponent<SpiderTankTurboState>(); enterState = GetComponent<SpiderTankEnterState>(); // retrieve other componenets health = GetComponent<HealthSystem>(); spawner = GetComponent<EnemySpawner>(); agent = GetComponent<NavMeshAgent>(); boxCollider = GetComponent<BoxCollider>(); ringUICanvas = GetComponentInChildren<Canvas>(); meshes = GetComponentsInChildren<MeshRenderer>(); animator = GetComponentInChildren<Animator>(); // register for player death callback player.gameObject.GetComponent<DeathSystem>().RegisterDeathCallback( PlayerDeathCallback ); // register for damage callbacks health.RegisterHealthCallback( SpiderDamageCallback ); healthCheckpoints.currentPhase = 0; // set hand player over as the target to a bunch of script KeepDistance keepDistance = GetComponent<KeepDistance>(); if ( keepDistance != null ) { keepDistance.target = player; } mortarLauncher.mortarSettings.targets = new Transform[1]; mortarLauncher.mortarSettings.targets[0] = player; spawnerLauncher.spiderTank = this; spawner.settings = phaseSettings[0].spawnerSettings; _healthMaxStart = health.maxHealth; _healthMaxCurr = _healthMaxStart; }
// Use this for initialization void Start () { es = GameObject.Find("Main Camera").GetComponent<EnemySpawner>(); ship_controller = GameObject.Find("Ship").GetComponent<ShipController>(); // Add all implemented abilities to list abilities.Add("Blink"); abilities.Add("Time Slow"); abilities.Add("Shield"); abilities.Add("Invincible"); abilities.Add("Hex Fire"); abilities.Add("Fire Trail"); mods.Add("turret"); mods.Add("sprinter"); mods.Add("spinner"); mods.Add("missle"); mods.Add("swapSticks"); mods.Add("inverseWorld"); UI.SetActive(false); }
//Methods void Start() { if (instance != null) { Destroy(gameObject); return; } instance = this; lEnemyOne = new List<GameObject> ( maxEnemyOne ); lEnemyTwo = new List<GameObject> ( maxEnemyTwo ); lEnemyThree = new List<GameObject> ( maxEnemyThree ); player = GameObject.Find ("Player").transform; StartCoroutine (CR_Spawn ()); }
/// <summary> /// Make needed references /// </summary> void Awake() { grid = GetComponentInChildren<Grid>(); worldBuilder = GameObject.FindGameObjectWithTag("Ground").GetComponent<WorldBuilderII>(); enemyspawner = Camera.main.GetComponent<EnemySpawner>(); }
// Use this for initialization void Start() { isBeingAttacked = false; statistics = Camera.main.GetComponent<Statistics>(); enemySpawner = Camera.main.GetComponent<EnemySpawner> (); gridManager = Camera.main.GetComponent<GridManager> (); max_Health = 300; curr_Health = 300; Armor = 20; Movement = 1; AttackRange = 14; canMove = false; Attack = 90; Movementtime = 30; movedForward = 0; isSelected = false; stoneTileClose = false; enemyHit = false; source = Camera.main.GetComponent<AudioSource>(); statistics = Camera.main.GetComponent<Statistics> (); }
void Awake() { instance = this; currentMoveSpeed = StartMoveSpeed; }