void onButtonClick() { foreach (ChoiceModel model in currChoices) { if (model.text == UIButton.current.gameObject.transform.FindChild("Label").GetComponent <UILabel>().text) { cleanup(); currentPlayer.jumpToScene(model.sceneNameToJump, model.sceneCommandIndexToJump); break; } } }
override public void execute(SequencePlayer player) { myPlayer = player; if (player.inRewindMode) { undo(); } else { string[] nicks = sequencerData.getSectionNames(); myPlayer.jumpToScene(nicks [targetSectionIndex], commandIndex); } }
public override void execute(SequencePlayer player) { myPlayer = player; if (player.inRewindMode) undo(); else { //evaluate expressions and jump to winning one if (expressionList.Count == 0) { Debug.LogWarning("Expression Jump with zero expressions, will continue to next command!"); myPlayer.callBackFromCommand(); } else { int foundIndex = -1; for (int i = 0; i < expressionList.Count; i++) { myPlayer.gameObject.GetComponent("Jurassic").SendMessage("evalBool", parseTextForVars(expressionList [i])); if (myPlayer.lastEvalResultBool) { foundIndex = i; break; } } if (foundIndex > -1) { myPlayer.jumpToScene(sectionNameList [foundIndex], commandIndexList [foundIndex]); } else { Debug.LogWarning("Expression Jump none of the expressions evaluated to true, will continue to next command!"); myPlayer.callBackFromCommand(); } } } }
public override void execute(SequencePlayer player) { myPlayer = player; if (player.inRewindMode) { undo(); } else { myPlayer.jumpToScene(targetSectionName, commandIndex); } }