public uint y; // strange value due to the CSV_reader. public Step(string[,] grid, uint y) { type = Utils.stringToEnum(grid[0, y]); this.grid = grid; this.y = y; }
private void displayNextStep() { currentPos++; if (currentPos >= currentStepList.Count) { EndCSVreading(); return; } Step currentStep = currentStepList[currentPos]; Utils.StepType typeToTreat = currentStep.type; print("Pos " + currentPos + " listSize = " + currentStepList.Count + " name ? " + typeToTreat.ToString()); //THE BIG SWITCH !!! switch (typeToTreat) { case (Utils.StepType.Description): DisplayDescription(currentStep); break; case (Utils.StepType.Dialogue): DisplayDialogue(currentStep); break; case (Utils.StepType.Animation): DisplayAnimation(currentStep); break; case (Utils.StepType.Bruitage): DisplayBruitage(currentStep); break; case (Utils.StepType.Musique): DisplayMusique(currentStep); break; case (Utils.StepType.Salle): DisplaySalle(currentStep); break; case (Utils.StepType.GoFight): DisplayFight(); break; case (Utils.StepType.Decor): DisplayDecor(currentStep); break; case (Utils.StepType.Next): DisplayNext(currentStep); break; case (Utils.StepType.Condition): DisplayCondition(currentStep); break; case (Utils.StepType.ChangeValeur): DisplayValeur(currentStep); break; case (Utils.StepType.ChangeZone): DisplayZone(currentStep); break; case (Utils.StepType.ChangeInteraction): DisplayInteraction(currentStep); break; case (Utils.StepType.ChangeState): DisplayChangeState(currentStep); break; case (Utils.StepType.AddItem): DisplayAddItem(currentStep); break; case (Utils.StepType.RemoveItem): DisplayRemoveItem(currentStep); break; case (Utils.StepType.CinematicBar): DisplayCinematicBar(currentStep); break; case (Utils.StepType.NextLine): DisplayNextLine(currentStep); break; case (Utils.StepType.ConditionLine): DisplayConditionLine(currentStep); break; default: Debug.LogError("CustomError : Can't treat this type : " + typeToTreat.ToString()); break; } }
public Step() { type = Utils.StepType.Description; grid = new string[5, 1]; y = 0; }