Exemplo n.º 1
0
 private void Start()
 {
     leftSpawnerScript  = leftSpawner.GetComponent <PlatformSpawner>();
     rightSpawnerScript = rightSpawner.GetComponent <PlatformSpawner>();
     lastPlatform       = SpawnedPlatform.Right;
     isFirstTime        = true;
 }
Exemplo n.º 2
0
 private void SpawnPlatform()
 {
     if (lastPlatform == SpawnedPlatform.Right)
     {
         leftSpawnerScript.Spawn();
         lastPlatform = SpawnedPlatform.Left;
         isFirstTime  = false;
         return;
     }
     if (lastPlatform == SpawnedPlatform.Left)
     {
         rightSpawnerScript.Spawn();
         lastPlatform = SpawnedPlatform.Right;
         isFirstTime  = false;
         return;
     }
 }