Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public void ClearPuzzle()
 {
     if (puzzle_ != null)
     {
         puzzle_.Reset();
     }
     bitmasks.SetPuzzle(null);
     bitmasks.gameObject.SetActive(false);
     puzzle_ = null;
 }
Exemplo n.º 3
0
 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());
     }
 }
Exemplo n.º 4
0
 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
                 )
         }
     };
 }
Exemplo n.º 5
0
 public void SetPuzzle(ref BitmaskPuzzle puzzle)
 {
     bitmasks.gameObject.SetActive(true);
     bitmasks.SetPuzzle(puzzle);
     puzzle_ = puzzle;
 }
Exemplo n.º 6
0
 virtual public void Apply(ref BitmaskPuzzle puzzle)
 {
     puzzle.currentValue = Act(puzzle.currentValue);
 }
Exemplo n.º 7
0
 public void SetPuzzle(BitmaskPuzzle puzzle)
 {
     puzzle_ = puzzle;
 }
Exemplo n.º 8
0
 public void EnablePuzzle(ref BitmaskPuzzle puzzle)
 {
     SetValue("$puzzle_target", GetPuzzleValue(puzzle.targetValue));
     SetValue("$puzzle_active", GetPuzzleValue(puzzle.currentValue));
     hackboy.SetEnabledPuzzle(puzzle, enabledOperations_);
 }
Exemplo n.º 9
0
 public void EnablePuzzle(ref BitmaskPuzzle puzzle)
 {
     hackboy.SetEnabledPuzzle(puzzle, enabledOperations_);
 }
Exemplo n.º 10
0
 public void SetEnabledPuzzle(BitmaskPuzzle puzzle, HashSet <BitmaskOperation> operations)
 {
     SetEnabledOperations(operations);
 }