Skip to content

Instantly share code, notes, and snippets.

@Split82
Created March 29, 2014 20:49
Show Gist options
  • Save Split82/9862700 to your computer and use it in GitHub Desktop.
Save Split82/9862700 to your computer and use it in GitHub Desktop.
if ([tutorialID isEqualToString:@"t1"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"blocks2" : @[[NSValue valueWithBoardPos:boardPosMake(1, 3)]],
@"destinations2" : @[[NSValue valueWithBoardPos:boardPosMake(5, 3)]]
};
return @[
TEXT_TE(boardPosMake(3, 3), 180.0f, NSLS(@"Welcome player!", @"")),
DELAY_TE(1.0),
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(3, 2), 180.0f, NSLS(@"I'm here to show you how to play this game.", @"")),
DELAY_TE(1.5),
TEXT_TE(boardPosMake(3, 5), 180.0f, NSLS(@"Press \"next\" button to continue.", @"")),
ARROW_TE(boardPosMake(3, 6), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
b1,
TEXT_TE(boardPosMake(2, 1), 180.0f, NSLS(@"This is the square.", @"")),
ARROW_TE(boardPosMake(1, 2), 0),
DELAY_TE(0.6),
ARROW_TE(boardPosMake(5, 4), M_PI),
TEXT_TE(boardPosMake(4, 5), 180.0f, NSLS(@"And this is the destination circle.", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(3, 1), 180.0f, NSLS(@"The goal of this game is to move squares to destination circles.", @"")),
DELAY_TE(1.5),
TEXT_TE(boardPosMake(3, 5), 180.0f, NSLS(@"You will do it by drawing paths.", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
HAND_ENTER_TE(boardPosMake(1, 3)),
DELAY_TE(0.2),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(5, 3), 2.0),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(2, 1), 180.0f, NSLS(@"Notice, that the path starts on the square.", @"")),
ARROW_TE(boardPosMake(1, 2), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(3, 5), 180.0f, NSLS(@"Lets see how it moves.", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
PLAY_GAME_TE(0.5),
TEXT_TE(boardPosMake(3, 1), 180.0f, NSLS(@"Awesome!", @"")),
DELAY_TE(1.0),
TEXT_TE(boardPosMake(3, 5), 180.0f, NSLS(@"Now is your turn to try it.", @"")),
];
}
else if ([tutorialID isEqualToString:@"t2"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"obstacles" : @[BPV(1, 0), BPV(1, 1), BPV(1, 2), BPV(1, 3), BPV(1, 4), BPV(1, 5), BPV(1, 6)],
};
TutorialElement *b2 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b2.params = @{
@"blocks2" : @[BPV(0, 5), BPV(0, 6)],
@"destinations2" : @[BPV(0, 0), BPV(0, 1)],
};
return @[
b1,
TEXT_TE(boardPosMake(4, 3), 120.0f, NSLS(@"You can not draw paths on these cells.", @"")),
ARROW_TE(boardPosMake(2, 3), M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
b2,
DELAY_TE(0.3),
TEXT_TE(boardPosMake(4, 1), 180.0f, NSLS(@"You can not draw paths on destination circles neither.", @"")),
ARROW_TE(boardPosMake(1, 1), M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(4, 0), 180.0f, NSLS(@"So how do we reach this circle?", @"")),
ARROW_TE(boardPosMake(1, 0), M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(4, 3), 150.0f, NSLS(@"Fortunately squares can push each other.", @"")),
DELAY_TE(0.7),
HAND_ENTER_TE(boardPosMake(0, 6)),
DELAY_TE(0.2),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(0, 1), 2.0),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
NEXT_STEP_TE,
RESET_VIEWS_TE,
PLAY_GAME_TE(0.5),
TEXT_TE(boardPosMake(4, 3), 150.0f, NSLS(@"This technique is very important, so don't forget it.", @"")),
];
}
else if ([tutorialID isEqualToString:@"t3"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"blocks1" : @[BPV(5, 6)],
@"blocks2" : @[BPV(0, 3)],
@"destinations1" : @[BPV(5, 0)],
@"destinations2" : @[BPV(6, 3)],
@"obstacles" : @[BPV(6, 0), BPV(6, 1), BPV(6, 2), BPV(6, 4), BPV(6, 5), BPV(6, 6)],
};
return @[
b1,
TEXT_TE(boardPosMake(3, 3), 180.0f, NSLS(@"This puzzle looks unsolvable. What will we do?", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
HAND_ENTER_TE(boardPosMake(5, 6)),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(5, 0), 0.8),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(0, 3), 0.4),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(6, 3), 0.8),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(2, 1), 180.0f, NSLS(@"This ain't gonna work.", @"")),
DELAY_TE(0.7),
TEXT_TE(boardPosMake(2, 5), 180.0f, NSLS(@"Fortunately I have something new to show you!", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
RESET_VIEWS_TE,
HAND_ENTER_TE(boardPosMake(5, 3)),
DELAY_TE(0.2),
HAND_FINGER_DOWN_TE,
DELAY_TE(0.5),
HAND_FINGER_UP_TE,
ADD_CONTINUER_TE(boardPosMake(5, 3)),
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(2, 1), 120.0f, NSLS(@"Lets see if it works now.", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
PLAY_GAME_TE(0.3),
TEXT_TE(boardPosMake(2, 1), 100, NSLS(@"Great!", @"")),
DELAY_TE(0.7),
TEXT_TE(boardPosMake(2, 4), 120.0f, NSLS(@"It might look like crossroad, but it actually just moves the square in the same direction it enters the cell.", @"")),
ARROW_TE(boardPosMake(4, 3), -M_PI_2),
];
}
else if ([tutorialID isEqualToString:@"t4"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"destinations1" : @[BPV(5, 1), BPV(6, 1)],
@"connectionsR" :@[BPV(5, 1)],
@"blocks1" : @[BPV(5, 5), BPV(6, 5)],
};
return @[
b1,
TEXT_TE(boardPosMake(2, 1), 120, NSLS(@"The destination circles are connected in this puzzle.", @"")),
ARROW_TE(boardPosMake(4, 1), -M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(2, 4), 190, NSLS(@"We need to use new element called COMBINATOR to combine squares, before they reach the circles.", @"")),
ARROW_TE(boardPosMake(1, 6), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
HAND_ENTER_TE(boardPosMake(0, -1)),
DELAY_TE(0.2),
HAND_FINGER_DOWN_TE,
DELAY_TE(0.4),
HAND_MOVE_HOLDING_COMBINATOR_TE(boardPosMake(5, 3), 1.9, CombinatorViewTypeCombineH),
HAND_FINGER_UP_TE,
DELAY_TE(0.3),
HAND_MOVE_TE(boardPosMake(5, 5), 0.4),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(5, 1), 0.8),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(6, 5), 0.4),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(6, 3), 0.4),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(2, 2), 120, NSLS(@"Notice that I used only one path here.", @"")),
ARROW_TE(boardPosMake(4, 2), -M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(2, 3), 120, NSLS(@"Because the squares will connect, they will move together, so one path is enough.", @"")),
ARROW_TE(boardPosMake(4, 3), -M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
PLAY_GAME_TE(0.5),
DELAY_TE(0.5),
TEXT_TE(boardPosMake(2, 1), 120, NSLS(@"One more thing.", @"")),
DELAY_TE(0.9),
TEXT_TE(boardPosMake(2, 4), 120, NSLS(@"Remember that connection of squares happen as soon as they reach combinator.", @"")),
];
}
else if ([tutorialID isEqualToString:@"t5"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"blocks1" : @[BPV(0, 0), BPV(6, 0), BPV(0, 6), BPV(6, 6)],
};
return @[
SHOW_PLAY_INFO,
TEXT_TE(boardPosMake(3, 3), 200, NSLS(@"The movement of squares happen in predefined order.", @"")),
DELAY_TE(1.4),
TEXT_TE(boardPosMake(3, 5), 200, NSLS(@"Check these arrows.", @"")),
ARROW_TE(boardPosMake(3, 6), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
b1,
HAND_ENTER_TE(boardPosMake(0, 6)),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(1, 6), 0.2),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(6, 6), 0.5),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(6, 5), 0.2),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(6, 0), 0.5),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(5, 0), 0.2),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(0, 0), 0.5),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(0, 1), 0.2),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(3, 5), 200, NSLS(@"The first phase is UP, so this square will move first.", @"")),
ARROW_TE(boardPosMake(5, 6), -M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
MAKE_GAME_STEP,
TEXT_TE(boardPosMake(3, 4), 200, NSLS(@"Notice that the phase indicator has moved.", @"")),
ARROW_TE(boardPosMake(3, 6), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(3, 1), 200, NSLS(@"Next one is the DOWN phase.", @"")),
ARROW_TE(boardPosMake(1, 0), M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
MAKE_GAME_STEP,
TEXT_TE(boardPosMake(3, 5), 200, NSLS(@"Now RIGHT", @"")),
ARROW_TE(boardPosMake(1, 6), M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
MAKE_GAME_STEP,
TEXT_TE(boardPosMake(3, 1), 200, NSLS(@"And the last one is LEFT", @"")),
ARROW_TE(boardPosMake(5, 0), -M_PI_2),
NEXT_STEP_TE,
RESET_VIEWS_TE,
MAKE_GAME_STEP,
TEXT_TE(boardPosMake(3, 2), 200, NSLS(@"So the order is: UP, DOWN, RIGHT, LEFT", @"")),
NEXT_STEP_TE,
TEXT_TE(boardPosMake(3, 4), 200, NSLS(@"If you are not sure, which one is next, always check the phase indicator.", @"")),
ARROW_TE(boardPosMake(3, 6), 0),
];
}
else if ([tutorialID isEqualToString:@"t6"]) {
TutorialElement *b1 = [TutorialElement elementWithName:kBoardTutElement params:nil];
b1.params = @{
@"blocks1" : @[BPV(5, 6), BPV(6, 6)],
@"connectionsR" : @[BPV(5, 6)],
@"destinations1" : @[BPV(5, 0), BPV(6, 0)],
};
return @[
b1,
TEXT_TE(boardPosMake(2, 5), 200, NSLS(@"Sometimes you need to split combined squares.", @"")),
ARROW_TE(boardPosMake(5, 5), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
TEXT_TE(boardPosMake(2, 5), 200, NSLS(@"You can use tool called SPLITTER.", @"")),
ARROW_TE(boardPosMake(3, 6), 0),
NEXT_STEP_TE,
RESET_VIEWS_TE,
HAND_ENTER_TE(boardPosMake(2, -1)),
DELAY_TE(0.2),
HAND_FINGER_DOWN_TE,
DELAY_TE(0.2),
HAND_MOVE_HOLDING_COMBINATOR_TE(boardPosMake(5, 3), 1.2, CombinatorViewTypeSplitH),
HAND_FINGER_UP_TE,
DELAY_TE(0.4),
HAND_MOVE_TE(boardPosMake(5, 6), 0.4),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(5, 0), 0.6),
HAND_FINGER_UP_TE,
HAND_MOVE_TE(boardPosMake(6, 3), 0.4),
HAND_FINGER_DOWN_TE,
HAND_MOVE_ADDING_MOVERS_TE(boardPosMake(6, 0), 0.6),
HAND_FINGER_UP_TE,
HAND_LEAVE_TE,
TEXT_TE(boardPosMake(2, 5), 200, NSLS(@"Lets see how it works", @"")),
NEXT_STEP_TE,
RESET_VIEWS_TE,
PLAY_GAME_TE(0.4),
TEXT_TE(boardPosMake(2, 3), 200, NSLS(@"Awesome! Now you know everything to finish all the levels.", @"")),
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment