public SelectedOptionAction(BitmaskOperation op, ref BitmaskPuzzle puzzle, int option, int success, int failure) { operation_ = op; puzzle_ = puzzle; label_ = op.Label(); normalOption_ = option; successOption_ = success; failureOption_ = failure; }
public void ClearPuzzle() { if (puzzle_ != null) { puzzle_.Reset(); } bitmasks.SetPuzzle(null); bitmasks.gameObject.SetActive(false); puzzle_ = null; }
public void SetEnabledPuzzle(BitmaskPuzzle puzzle, HashSet <BitmaskOperation> enabled) { if (puzzle.HasRequiredModules(enabled)) { SetEnabledOperations(enabled); } else { screenTextBuilder.Length = 0; screenTextBuilder.AppendLine("=================="); screenTextBuilder.AppendLine(" WARNING "); screenTextBuilder.AppendLine("=================="); screenTextBuilder.AppendLine("Required module missing! Hack may not be possible!"); SetText(screenTextBuilder.ToString()); } }
private void Awake() { puzzles_ = new Dictionary <string, BitmaskPuzzle>() { { "hack_joke", BitmaskPuzzle.Get( BitmaskPuzzle.Difficulty.Easy, BitmaskOperation.shiftLeft ) }, { "hack_xor5", BitmaskPuzzle.Get( BitmaskPuzzle.Difficulty.Medium, BitmaskOperation.add32, BitmaskOperation.shiftLeft ) }, { "hack_email", BitmaskPuzzle.Get( BitmaskPuzzle.Difficulty.Difficult, BitmaskOperation.shiftLeft, BitmaskOperation.xor5, BitmaskOperation.invert ) }, { "hack_spaceplans", BitmaskPuzzle.Get( BitmaskPuzzle.Difficulty.Difficult, BitmaskOperation.shiftLeft, BitmaskOperation.xor5, BitmaskOperation.add32, BitmaskOperation.invert ) } }; }
public void SetPuzzle(ref BitmaskPuzzle puzzle) { bitmasks.gameObject.SetActive(true); bitmasks.SetPuzzle(puzzle); puzzle_ = puzzle; }
virtual public void Apply(ref BitmaskPuzzle puzzle) { puzzle.currentValue = Act(puzzle.currentValue); }
public void SetPuzzle(BitmaskPuzzle puzzle) { puzzle_ = puzzle; }
public void EnablePuzzle(ref BitmaskPuzzle puzzle) { SetValue("$puzzle_target", GetPuzzleValue(puzzle.targetValue)); SetValue("$puzzle_active", GetPuzzleValue(puzzle.currentValue)); hackboy.SetEnabledPuzzle(puzzle, enabledOperations_); }
public void EnablePuzzle(ref BitmaskPuzzle puzzle) { hackboy.SetEnabledPuzzle(puzzle, enabledOperations_); }
public void SetEnabledPuzzle(BitmaskPuzzle puzzle, HashSet <BitmaskOperation> operations) { SetEnabledOperations(operations); }