Performing the first trick
Player must be in air. Depending on how this state is reached, there are 3 options:
- Boost Jump: player boost jumped by pressing Trick just before leaving the ground. In this case the trickInputWindow timer will start the moment the Trick button is pushed before jumping and only a direction input must be supplied.
- Normal Jump/Fall: player jumps normally or falls from a cliff without jumping. The player must press the Trick button to start the trickinputWindow counter and then input a direction before the counter reaches 0.
Consecutive tricks: Chains, Link and Perfect Links
- Chains: Chains are tricks that are performed in the same jump with no restrictions.
- Links: If the player presses the Trick button at the correct moment as the previous trick is ending (trickChain > trickLink, set trickInputWindow=trickInputWindowMax) and inputs a direction the player will perform a Link instead of a Chain. The next trick will be performed faster and rack up more points.
- Perfect Link: The same as Links, but the time window is much more narrower. The next trick will receive an ever bigger boost (score as well).
Examples
TB+R=FlipF(L1)->TB+R=FlipF(L1)->TB+TB=Double FlipF (L2)
TB+R=FlipF(L1)->TB+R=FlipF(L1)->TB+U=Double FlipFSpin(L3)
TB+R=FlipF(L1)->TB+R=FlipF(L1)->TB+TB=DoubleFlipF(L2)->TB+U=Double FlipFSpin(L3)
Implementation
stDrive: exitingRamp
if (trickJustPressed){
trickInputWindow = trickInputWindowMax;
trickLink = 0;
}
stJump
if (trickInputWindow > 0) LaunchTrick();
else if (trickJustPressed){
trickInputWindow = trickInputWindowMax;
LaunchTrick();//This allows simultaneous presses of TB+Direction
}
LaunchTrick
if (tricks.Count < 2){
if (rightJustPressed) StartTrick(trickNFlipF);
else if (...)
}else{
if (rightJustpressed){
if (tricks(tricks.Count-2) == trickNFlipF){
if (tricks(tricks.Count-1))==trickNFlipF) StartTrick(trickNTripleFlipF);
else if (tricks(tricks.Count-1))==trickNSpin) StartTrick(trickNDoubleFlipFSpin);
}else if...
}
}
}
StartTrick(int newTrick)
trickInputWindow = 0;
currentTrick = newTrick;
tricks.Add(currentTrick);
switch (newTrick){
case trickNFlipF:
trickTurns[axisZ] = 1;
trickSpeed[axisZ] = -1;//Set speed according to Chain, Link or PerfectLink
break;
}
EndTrick()
currentTrick = -1;
trickChain = trickChainMax;
No hay comentarios:
Publicar un comentario