public CharIndexContainerInt sum(CharIndexContainerInt o) { CharIndexContainerInt r = new CharIndexContainerInt(); foreach (CharacterIndex e in CharacterIndex.sAllCharacters) { r[e] = this[e] + o[e]; } return(r); }
public void CUTSCENE_finished(NUPD.ChangeSet changes = null) { TED.add_one_shot_event( delegate() { mManager.mMusicManager.fade_out(3); //fadeout whataver is playing, either the cutscene music or the character music (which plays after cutscene music finishes //apply all the diff changes again (in case we skipped and tehy werent applied duringcutscene) if (changes != null) { foreach (var e in changes.Changes) { CharIndexContainerInt diffChanges = e.Changes; //string changeMsg = e.Description; foreach (CharacterIndex cchar in CharacterIndex.sAllCharacters) { if (diffChanges[cchar] != 0) { mManager.mGameManager.change_character_difficulty(cchar, diffChanges[cchar]); } } } } } , 0).then_one_shot( delegate() { if (CurrentPerformanceStat.Character.LevelIndex > 6) //if natural death :) { if (space_camp_final_exam()) { transition_to_ASTRONAUT(); } else { //natural death mInterfaceManager.set_for_DEATH(CurrentPerformanceStat.Character) .then_one_shot( delegate() { transition_to_TRANSITION_play(new CharacterIndex("999")); } , 0); } } else { transition_to_CHOICE(); } } , GameConstants.transitionToChoiceDelayTime); }
public CharIndexContainerInt accumulative_changes() { CharIndexContainerInt r = new CharIndexContainerInt(); if (Changes.Count > 0) { r = Changes[0].Changes; } for (int i = 1; i < Changes.Count; i++) { r = r.sum(Changes[i].Changes); } return(r); }
public ChangeSubSet() { Description = ""; Changes = new CharIndexContainerInt() { Contents = new int[][] { new int[] { 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0 }, new int[] { 0 } } }; }