Ejemplo n.º 1
0
 void Start()
 {
     //not in a wave
     waveActive = false;
     //game isn't active
     gameStarted = false;
     //mobs not spawning
     waveSpawning = false;
     //get scripts
     mapWaves     = GetComponent <MapWaves> ();
     mobStats     = GetComponent <MobStats> ();
     mobSpawner   = GetComponent <MobSpawner> ();
     levelmanager = GetComponent <TDLevelManager> ();
     waveRecord   = PlayerPrefs.GetInt(levelmanager.mapName + "Waves");
     //set display
     tmProCountdown = countdownTimer.GetComponent <TextMesh>();
     //currently only made it to wave 1
     highestWave = 1;
     //all mob info 0 to start
     mobStats.mobsCurrentlyActive = 0;
     mobStats.mobsSpawnedThisWave = 0;
     mapWaves.CountdownOne();
     tmProWaveCounter.text = 1.ToString ();
     tmProMobCounter.text  = waveOneMobs.ToString();
     if (freebuild)
     {
         if (PlayerPrefs.HasKey("name"))
         {
             playerName = PlayerPrefs.GetString("name");
         }
     }
 }
Ejemplo n.º 2
0
 void Awake()
 {
     basicLevel              = 4;
     rangedLevel             = 3;
     flyerLevel              = 4;
     smallBossLevel          = 2;
     bigBossLevel            = 3;
     waypointManager         = GetComponent <WaypointManager> ();
     mobSpawner              = GetComponent <MobSpawner> ();
     QualitySettings.shadows = ShadowQuality.Disable;
 }
Ejemplo n.º 3
0
 void Awake()
 {
     waypointManager = GetComponent <WaypointManager> ();
     mobSpawner      = GetComponent <MobSpawner> ();
 }