void Activate_Comp_2() { Debug.Log("Composition_2_Start"); floorSpawningMode = FloorSpawningMode.Comp_2; int i = 0; SpawnFloor(i); i++; }
void SpawnInitialFloors() { Debug.Log("Spawn initial Floors"); for (int i = 0; i < StartingComposition.Count; i++) { SpawnFloor(i); if (i == (StartingComposition.Count - 1)) { floorSpawningMode = FloorSpawningMode.Randomize; } } }
public void UpdateFloorTile() { CurrentFloorTile = (int)((float)PlayerMovement.howFarIGot / FloorThickness); if (OldFloorTile < CurrentFloorTile) { if (floorSpawningMode == FloorSpawningMode.Testing) { //Debug.LogError ("Testing Floor"); SpawnFloor(CurrentFloorTile); } else { if ((CurrentFloorTile > CompStartsAt_1_a) && (CurrentFloorTile < (CompStartsAt_1_a + Composition_1.Count))) { //Debug.LogError ("1"); Activate_Comp_1(); } else if ((CurrentFloorTile > CompStartsAt_1_b) && (CurrentFloorTile < (CompStartsAt_1_b + Composition_2.Count))) { //Debug.LogError ("2"); Activate_Comp_1(); } else if ((CurrentFloorTile > CompStartsAt_1_c) && (CurrentFloorTile < (CompStartsAt_1_c + Composition_2.Count))) { //Debug.LogError ("3"); Activate_Comp_1(); } else if ((CurrentFloorTile > CompStartsAt_1_d) && (CurrentFloorTile < (CompStartsAt_1_d + Composition_2.Count))) { //Debug.LogError ("4"); Activate_Comp_1(); } else if ((CurrentFloorTile > CompStartsAt_1_e) && (CurrentFloorTile < (CompStartsAt_1_e + Composition_2.Count))) { //Debug.LogError ("5"); Activate_Comp_1(); } else if ((CurrentFloorTile > CompStartsAt_2_a) && (CurrentFloorTile < (CompStartsAt_2_a + Composition_2.Count))) { //Debug.LogError ("6"); Activate_Comp_2(); } else if ((CurrentFloorTile > CompStartsAt_2_b) && (CurrentFloorTile < (CompStartsAt_2_b + Composition_2.Count))) { //Debug.LogError ("7"); Activate_Comp_2(); } else if ((CurrentFloorTile > CompStartsAt_2_c) && (CurrentFloorTile < (CompStartsAt_2_c + Composition_2.Count))) { //Debug.LogError ("8"); Activate_Comp_2(); } else if ((CurrentFloorTile > CompStartsAt_2_d) && (CurrentFloorTile < (CompStartsAt_2_d + Composition_2.Count))) { //Debug.LogError ("9"); Activate_Comp_2(); } else if ((CurrentFloorTile > CompStartsAt_2_e) && (CurrentFloorTile < (CompStartsAt_2_e + Composition_2.Count))) { //Debug.LogError ("10"); Activate_Comp_2(); } else { //Debug.LogError ("Randomizing Floor"); floorSpawningMode = FloorSpawningMode.Randomize; SpawnFloor(CurrentFloorTile); } } OldFloorTile = CurrentFloorTile; //Debug.LogError (CurrentFloorTile + "||" + floorSpawningMode); } }